Forum


Replies: 1   Views: 2425
Line height and styles
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by helpdesk@hrdownloads.com  · 02-04-2019 - 18:48

I'm having a problem where documents are converting in a manner where the page heading is applying the wrong line-height, causing multiple lines of text to overlap. This is resulting in all HTML documents having a squished heading, along with some less noticeable issues. The styles that are being applied appear to be set in pixels. The documents being converted are primarily being supplied by the end user, so it is difficult to rely on good source documents.

I have tried using importStyles() to replace the docx settings but didn't see any results. I'm not sure whether this is the correct solution, or whether I should do something else to normalize the text styles.

The fixed line-height doesn't appear to be set anywhere in the original document. The heading font appears similar to Heading 1 PHPDOCX.

A few questions:
1) Are the undesirable styles coming from a phpdocx template or somewhere else?
2) What method should be used to address the styles? Add them through importStyles(), change the base template, or some other method?
3) Similar problems happen with nested styles. Is there a particular method to clean the markup?