Forum


Replies: 3   Views: 4266
Fatal error while converting to pdf
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 jdespatis  · 11-10-2014 - 09:16

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

Posted by jorge  · 12-10-2014 - 11:17

Deleted by jorge · 12-10-2014 - 11:17

Posted by admin  · 12-10-2014 - 11:18

Hello, The conversion plugin is the same in phpdocx 4.1, with the difference that charts are supported. Please contact us on http://www.phpdocx.com/contact and send us the DOCX. Regards.

Posted by jdespatis  · 12-10-2014 - 16:40

Ok done I've contacted you through contact@phpdocx.com