Replies: 1   Views: 270
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


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] the most simple HTML that illustrates what you need to do and we'll check it.


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 you can read the supported attributes and styles when adding lists from HTML, a custom list style ( can be applied to generate and apply more list styles to HTML ( Lists section).