Forum


Replies: 4   Views: 4491
Embedhtml(): how to style bold text when strictwordstyles = true
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  · 17-12-2015 - 08:04

Hello,

We recommend you to read in detail the documentation available on this page: http://www.phpdocx.com/documentation/introduction/html-to-word-PHP

It explains all supported tag and styles. If the style or tag is not explicity detailed on this page, then it's not officially supported.

For example about font-size, the units may be pixels, points or ems...

And a paragraph custom style can't be applied to a chunk of text, only to the whole paragraph.

We recommend you to use strictWordStyles as false with your own template that is a more flexible approach; or use more than once embedHtml to add each HTML content. To set some rPr attributes (font-size, color, position), this is styles for a run of text, you need to set the strictWordStyles as false. There's no need, but some special cases, to set strictWordStyles always as true.

Regards.