Forum


Replies: 1   Views: 238
Microsoft publisher - importing docx documents: issues with table cell content and strictwordstyles
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  · 01-07-2025 - 09:37

Hello,

Please note that the strictWordStyles option does the following:

If true ignores almost all CSS styles

If you enable this option, almost all CSS styles are not applied. This option is useful when applying custom styles using the wordStyles option.
The strictWordStyles option is applied to the whole transformation. There's no option to apply this option only to specific parts of the document.

If you don't want to apply specific styles, you need to add additional CSS styles. For example, setting the border as none to not adding a border style in a table.

Regarding Microsoft Publisher, please note that it doesn't support many contents and styles available in DOCX documents: colspans, rowspans, spacings, borders, links, endnotes, comments, headers, footers... Please note that this is not a phpdocx issue, but a limitation from Microsoft Publisher that only supports simple DOCX documents.

Instead of Microsoft Publisher, we recommend you open the same DOCX with MS Word, LibreOffice, and other DOCX editors. The OOXML code you have posted is correct and valid.

Regards.