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.
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... So...this question could be ridiculous or incomprehensible or any other thing?
In other case I got answer in a couple hours...
Hello,
Please send to contact[at]phpdocx.com the most simple script that illustrates your issue and the template.
As we need to run this script, it can't do external connections such as databases or web services.
Regards.
Thanks! I sent an e-mail!
Actually I runned your exmaple codes!
Copy from this page: http://www.phpdocx.com/documentation/introduction/html-to-word-PHP
sectoin: Using native Word formatting with HTML source code. Run it and in
$wordStyles = array('[table TAG open-close]' => 'LightListAccent3PHPDOCX', '[h1 TAG open-close]' => 'Heading2PHPDOCX' , '.heading2' => 'Heading2PHPDOCX');
'[h1 TAG open-close]' => 'Heading2PHPDOCX' part is not work. The .heading2 is fine but the TAG using is not!
Tha base source code was example/Core/embedHTML/sample_1.php I just modified the cvode from the mentioned page....
Edited by admin ·
08-05-2015 - 11:11 Hello,
You have been replied by email; please don't mix the messages. All website and package samples work perfectly.
Regards.I got your answer and you are right!
It wasn't any answer about our letter...and the code not work! I am sure. I checked it 2 times...