Forum


Replies: 11   Views: 2108
Pdf lossless compression doesn't work?
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 jeremie  · 30-03-2020 - 15:06

I'm trying to use option to do a lossless compression when using transformDocument.

The following code, without lossless, works fine:

$docx->transformDocument('TestTransformDocument.docx', 'TestTransformDocument.pdf', 'libreoffice', ['debug' => true]);

But the following code, with lossless, doesn't work and returns a warning:

$docx->transformDocument('TestTransformDocument.docx', 'TestTransformDocument.pdf', 'libreoffice', ['lossless' => true, 'debug' => true]);

The warning is:

Warning: rename(./TestTransformDocument.pdf,TestTransformDocument.pdf): File not found. (code: 2) in \phpdocx-premium-9.5\classes\TransformDocAdvLibreOffice.php on line 157