when i use generatePDF function im getting an error:
Deprecated: __autoload() is deprecated, use spl_autoload_register() instead in /home/snterp/public_html/office/_libs/PHPDocx/lib/pdf/dompdf_config.inc.php on line 431
if working with
when i use generatePDF function im getting an error:
Deprecated: __autoload() is deprecated, use spl_autoload_register() instead in /home/snterp/public_html/office/_libs/PHPDocx/lib/pdf/dompdf_config.inc.php on line 431
if working with
Hello,
We don't recommend using the generatePDF method. It's a very old method that was replaced by the conversion plugin since phpdocx 4 (https://www.phpdocx.com/documentation/conversion-plugin); as you have an Advanced license, please use the conversion plugin to transform DOCX to PDF.
If you still want to use that old method, we recommend you to hide deprecated messages in the PHP configuration; it's not an error but a deprecated notice. That deprecated messaged with PHP 7.2 was removed in phpdocx 8.
Regards.
that does not seem to work either...
im running on linux and setup libreoffice already.
i tried test script:
https://www.phpdocx.com/api-documentation/format-conversion/convert-Word-docx-into-pdf-with-PHP
doxs is created but not pdf. also dont get any errors. any suggestions?
actually getting an error now. my code:
require_once $_SERVER['DOCUMENT_ROOT'].'/office/_libs/PHPDocx/classes/TransformDoc.inc';
require_once $_SERVER['DOCUMENT_ROOT'].'/office/_libs/PHPDocx/classes/CreateDocx.inc';
$docx = new TransformDocAdvLibreOffice();
$docx->transformDocument($_SERVER['DOCUMENT_ROOT'].'/office/_tmp/example_text5.docx', $_SERVER['DOCUMENT_ROOT'].'/office/_tmp/example_text5.pdf');
ERROR:
Warning: rename(/home/snterp/public_html/office/_tmp/example_text5.pdf,/home/snterp/public_html/office/_tmp/example_text5.pdf): No such file or directory in /home/snterp/public_html/office/_libs/PHPDocx/classes/TransformDocAdvLibreOffice.inc on line 134
and no file is generated
Hello,
You need to install and configure the conversion plugin correctly, it seems there's some missing rw access; the rename error is a generic problem when the document can't be generated. Please read the information available on:
https://www.phpdocx.com/documentation/conversion-plugin/conversion-plugin-installation-and-set-up
https://www.phpdocx.com/documentation/conversion-plugin/common-problems-and-possible-errors
https://www.phpdocx.com/documentation/conversion-plugin/debugging-libreoffice
to install, debug and solve the most common issues.
After config the conversion plugin, we recommend (as the debugging page explains), to test it using PHP CLI mode.
Regards.
Hi,
Thanks for your response. I figured it out. We needed to update libreoffice path in phpdocxconfig.ini file, which was kinda hard to find in any documentation
Hello,
It's explained in the second step of the installation page (Set up section):
https://www.phpdocx.com/documentation/conversion-plugin/conversion-plugin-installation-and-set-up
Anyway, we move the request to the website team to highlight it more.
Regards.