Forum


Replies: 6   Views: 4060
Html to word style setting problem
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 Sven May  · 07-05-2015 - 09:06

Hello! I use the following code: $docx = new CreateDocxFromTemplate($template); $docx->embedHTML('

'.$htmlCode.'

', array('strictWordStyles'=>true, 'wordStyles'=>array('

'=>'description', '
  • '=>'descriptionList'))); Both style - description and descriptionList is based in word template what I use. I read this page: http://www.phpdocx.com/documentation/introduction/html-to-word-PHP Found that solution where use HTML tag to set which stlye shold be get on...but it is not work :( If I use class like this: '

    '.$htmlContent.'

    ' then I define style useing like this: 'wordStyles'=>array('.desc_content'=>'description', .... it is work I can not find whats worng...what I am using wrong because both styles not manage to enforce...