Forum


Replies: 7   Views: 6129
Transform doc 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 lclemenson  · 12-05-2015 - 11:36

Hello, Thanks for your help, I've just commented the second line ; libxml_disable_entity_loader(true); and it works again to create the doc document. But still stuck with the following error : Warning: rename(/var/www/oscar/docs/example_text.pdf,/var/www/oscar/docs/example_text.pdf): No such file or directory in /var/www/oscar/vendor/phpdocx/Classes/Phpdocx/Transform/TransformDocAdvLibreOffice.inc line 96 The code I'm using is the following : $docx = new \Phpdocx\Create\CreateDocx(); $docx->enableCompatibilityMode(); $text = 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, ' . 'sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut ' . 'enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut' . 'aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit ' . 'in voluptate velit esse cillum dolore eu fugiat nulla pariatur. ' . 'Excepteur sint occaecat cupidatat non proident, sunt in culpa qui ' . 'officia deserunt mollit anim id est laborum.'; $docx->addText($text); $docx->createDocx('/var/www/oscar/docs/example_text'); $docx->transformDocument('/var/www/oscar/docs/example_text.docx', '/var/www/oscar/docs/example_text.pdf'); It create the docx but does not transfom it. Thanks