Forum


Replies: 8   Views: 258
Word to html, display empty line breaks, and work with tables using addtable

Posted by admin  · 17-10-2024 - 14:49

Hello,

If you want to display empty line breaks in a web browser when transforming DOCX to HTML, please enable the includeBlankSpacesInEmptyParagraphs option (https://www.phpdocx.com/api-documentation/format-conversion/transform-docx-html-using-native-php-classes):

$transform->transform($transformHTMLPlugin, ['includeBlankSpacesInEmptyParagraphs' => true]);

Regarding the internal table border question, please check you are setting the borders per cell, not as a global table style. Also please check you are using specific values instead of theme ones.

On https://www.phpdocx.com/documentation/introduction/word-to-html-PHP (Supported OOXML tags and attributes section) are detailed all supported Word tags and styles in the current stable release of DOCX to HTML, and how they are transformed to HTML.

If you send the DOCX document you are transforming to contact[at]phpdocx.com, we'll check it and send some tips to improve the conversion.

Regards.