Forum


Replies: 5   Views: 5612
The system cannot find the file specified. (code: 2) in [path]\classes\transformdocadvlibreoffice.in
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 brianbriskey  · 09-04-2018 - 15:29

We have tried all the steps on this thread: 

https://www.phpdocx.com/documentation/conversion-plugin/debugging-libreoffice

As you can see in the code we create a file just fine. It is the renaming and converting process that bombs out. I have changed the parameters, ran as a script and I am stuck. We added .dll references to the PHP setting per other posts. Restarted the server, no change. I get this error from my test page as well as the example pages that came with the solution. 

We are running PHP on Windows Server. Any help would be appreciated. 

Here is my source code: 

<?php
$docx = new CreateDocx();
// enable the compatibility mode to allow the library to warn us in case of using non-compatible content
$docx->enableCompatibilityMode();
// add a text to the document
$text = 'Lorem ipsum dolor sit amet, consectetur adipisicing elit';
$docx->addText($text, $paramsText);
// generate the new document
$docx->createDocx('../temp/simpleHTML.docx');
$filename = '/pandp/temp/simpleHTML.docx';
$newname = '/pandp/temp/simpleHTML.pdf';
//make sure new file was created 
if (file_exists($filename)) {
    echo "The file $filename exists";
} else {
    echo "The file $filename does not exist";
}
$newpdf = new TransformDocAdvLibreOffice();
$newpdf->transformDocument($filename, $newname, '../temp/', array( 'method' => 'script'));
?>