Forum


Replies: 2   Views: 3142
Addhtml not working
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 mahnid  · 28-04-2012 - 17:58

I've searched the forum and can't find a solution. Sorry it it's already been covered.

I can not get addHTML to work. either the resulting document is corrupted (openoffice, etc. can't open it) or the document is ok but the HTML content is missing.

My code is exactly as in the examples. Installation of PHP, etc. look ok also.

Where am I going wrong..... please help.

ta,

Andy

[code]<?PHP

require_once '../phpdocx/classes/CreateDocx.inc';

$docx = new CreateDocx();

$docx->addText('HTML content');

$html= '<p><strong>PHPDOCX</strong> is a PHP library designed to generate completely dynamic and fully customizable Word documents.</p>';

$docx->addHTML($html);

$docx->addText('End HTML content');

$docx->createDocx('../docx/example_html');
?>[/code]

Posted by admin  · 11-04-2013 - 12:13

Hello,

Please check:

http://www.phpdocx.com/archives/1978

You can use embedHTML method instead of addHTML to get OpenOffice compatibility.

Regards.