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'm using a very simple script to load a template and convert it to pdf
The piece of code is something like:
-----
$phpDocx = new \CreateDocxFromTemplate("/home/jerome/Téléchargements/2014-10-07_101911-Sauzay.docx");
$phpDocx->enableCompatibilityMode();
$filename = "/tmp/output";
$phpDocx->createDocx($filename);
//$phpDocx->transformDocument($filename . '.docx', $filename . '.pdf', null, array('method' => 'script'));
$phpDocx->transformDocument($filename . '.docx', $filename . '.pdf');
return $filename . '.pdf';
-------
But I get a PHP error:
FatalErrorException: Error: Call to a member function getAttribute() on a non-object in /[...]/vendor/phpdocx/phpdocx/classes/RepairPDF.inc line 140
I'm using phpDocx Enterprise 4.0 (with some hotfixs from phpDocx Support)
I can send you this .docx template
Is 4.1 much stronger for PDF conversion ?
Thanks for your help