We are having problems transforming a generated docx file to PDF.
We have set up the OOService.sh script as recommended. We have run the Transform.php file in CLI, output as follows.
May 1, 2013 3:25:07 PM
com.artofsolving.jodconverter.openoffice.connection.AbstractOpenOfficeConnection connect INFO: connected May 1, 2013 3:25:16 PM
com.artofsolving.jodconverter.openoffice.connection.AbstractOpenOfficeConnection disposing INFO: disconnected
We have tried 2 methods of coverting the docx, with the listed results:
// transform file into pdf
// finalfile = /FULL_ABSOLUTE_PATH/filename.docx
/* corrupted file error on open pdf */
$pdf = new TransformDoc();
$pdf->setStrFile($finalfile);
$pdf->generatePDF();
/* no error but no file */
$docx->enableCompatibilityMode();
$docx->transformDocx($finalfile,substr($finalfile,-5).'.pdf');
Also, in the corrupted file created via generatePDF, if the file is opened as a text document you see the following on the first few lines:
<br />
<b>Warning</b>: strstr() [<a href='function.strstr'>function.strstr</a>]: Empty delimiter in <b>/usr/include/php/phpdocx/classes/GenerateDocx.inc</b> on line <b>40</b><br />
<br />
<b>Warning</b>: strstr() [<a href='function.strstr'>function.strstr</a>]: Empty delimiter in <b>/usr/include/php/phpdocx/classes/GenerateDocx.inc</b> on line <b>40</b><br />
%PDF-1.3
Removing the initial lines of warning does not fix the file corruption.