Forum


Replies: 1   Views: 721
Error in transferdocadvlibreoffice
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 Exorion  · 03-06-2021 - 07:16

In phpdocx 10 i have the issue then i make tranformDocument with the same names of transformFiles (like example.docx,example.pdf)

it's a code from vendor/phpdocx/Classes/Phpdocx/Transform/TransformDocAdvLibreOffice.php:174 - i have the rename the same file with the same extensions


        // get the converted document, this is the name of the source and the extension
        $newDocumentPath = $outdir . '/' . $sourceFileInfo['filename'] . '.' . $filesExtensions['targetExtension'];

        // move the document to the guessed destination
        rename($newDocumentPath, $target);
 

Posted by admin  · 03-06-2021 - 10:26

Hello,

There's no error and the class is fully tested. You can use the outdir option available in transformDocument to set a custom target folder instead of the one from the source document as it's required by LibreOffice to transform the documents.

Regards.