Forum


Replies: 4   Views: 5928
Template output pdf - compatibility mode error
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 jorgelj  · 18-12-2013 - 09:00

Hello,



Please try using the TransformDocAdv class. First create the document:



require_once '/var/www/app/phpdocx/classes/CreateDocx.inc';

$docx = new CreateDocx();

$docx->addTemplate('docx_template.docx');

$docx->addTemplateVariable('TIMESTAMP', date('l F, Y | g:i a'));

$docx->addTemplateVariable('CLIENT', 'Client Name Inc.');

$docx->createDocx('outfile');



But to do the transformation use the TransformDocAdv class:



$transform = new TransformDocAdv();



$transform->transformDocument('input.docx', 'output.pdf');



Regards. Jorge.