Forum


Replies: 3   Views: 3898
Html to pdf, pro version
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 RamirezZ  · 19-06-2011 - 11:13

Is it possible that the function generatePDF(); is not able to output html code?
If i run the following code:

[code]
require_once '../../classes/CreateDocx.inc';
require_once '../../classes/TransformDoc.inc';

$docx = new CreateDocx();

$docx->addText('HTML content');
$html= '<p>Test HTML</p>';
$docx->addHTML($html);
$docx->addText('End HTML content');
$docx->createDocx('example_html');

$document = new TransformDoc();
$document->setStrFile('example_html.docx');
$document->generatePDF();
[/code]

The docx file displays properly:
HTML content
Test HTML
End HTML content

The pdf file however just displays:
HTML content

End HTML content

Am I missing something?