Forum


Replies: 3   Views: 4087
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?

Posted by nclsHart  · 11-04-2013 - 12:12

Hi,

No you miss nothing. I have the same problem.

Since v2.3, PHPDOCX uses the altChunk Docx property for insert HTML content instead of a conversion ( like in the v2.2 ). And it seem's that content add with altChunk are not totaly handled for the moment.


Posted by RamirezZ  · 11-04-2013 - 12:12

Oke, this info helps, thank you.