Forum


Replies: 1   Views: 47
Error in transferdocadvlibreoffice

Posted by Exorion  · 03-06-2021 - 07:16

Edited by Exorion · 03-06-2021 - 07:38

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.