Forum


Replies: 1   Views: 728
Styles are reset if there is no data in html-tags
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 admin  · 20-12-2021 - 16:33

Hello,

Some styles can only be applied when tags contain values. This is a requirement that can't be changed (at least in the current stable release). MS Word have also some requirements (that phpdocx follows and fix automatically to avoid generating corrupted documents); for example a cell content can't be empty or the document will appear as corrupted when being opened with MS Word, it must contain at least one paragraph (empty or with contents).

Please post (or send to contact[at]phpdocx.com) the most simple HTML that illustrates what you need to do and we'll check it.

About:

And from this problem follows the following that after generation of docx of the document if to try to correct in manual any block, for example the list styles too are reset.

sorry, but we don't understand it. On https://www.phpdocx.com/htmlapi-documentation/html-standard/insert-ul-ol-li-list-Word-document-with-HTML you can read the supported attributes and styles when adding lists from HTML, a custom list style (https://www.phpdocx.com/api-documentation/layout-and-general/create-Word-custom-list-style-with-PHP) can be applied to generate and apply more list styles to HTML (https://www.phpdocx.com/documentation/introduction/html-to-word-PHP Lists section).

Regards.