Forum


Replies: 7   Views: 6474
Generate pdf, convert plugin, no output pdf file
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 magira  · 10-10-2014 - 13:42

Hi ! I have just make some test to convert a docx file in pdf like specified on page http://www.phpdocx.com/documentation/pdf-conversion-plugin-installation-guide I have some trouble, because when i lauch the script on localhost/test/transform.php on a apache server, the pdf file isn't generate. Soo after, i verify my config by launch the file check.php (+fix all problem). Then i relaunch the script with the debug mode on function $docx->transformDocument . The debug mode just print "Done" without error ... but the PDf file is always not generate. I have read some topics about similar probleme. Some of them tell that i have to run the php in command line (CLI mode). With this solution, the pdf file is correctly generate. My question : How can I run this with my Apache server (without commande line mode..) ?? Thank you for answer.

Posted by admin  · 12-10-2014 - 11:20

Hello, We recommend you to check your server logs. It's usually a problem related to rw access, the missing of the .wapi folder or SELinux that is blocking the execution of external programs. Did you read the section ' Common Linux issues' on http://www.phpdocx.com/documentation/pdf-conversion-plugin-installation-guide? Regards.

Posted by magira  · 13-10-2014 - 07:19

Hello, Thanks for the answer. I'm not on Linux. I use Apache Server on Windows 7. When I run this command : ... $docx->createDocx('./template/4_transform_docx_to_pdf'); $docx->transformDocument('./template/4_transform_docx_to_pdf.docx', './result/4_transform_docx_to_pdf.pdf', null, array( 'method' => 'script','debug' => true)); I can read on the error log a problem with Open Office : Exception in thread "main" com.artofsolving.jodconverter.openoffice.connection.OpenOfficeException: conversion failed: could not load input document at com.artofsolving.jodconverter.openoffice.converter.OpenOfficeDocumentConverter.loadAndExport(OpenOfficeDocumentConverter.java:131) Caused by: com.sun.star.lang.IllegalArgumentException: URL seems to be an unsupported one. Reminder : if I run the above php code with php-cli it works fine, but not created pdf file if i use apache (localhost). The Debug mode just print "Done." The docx is created fine but not the pdf file. my soffice -headless is up and running Is there someone who have a similar problem ? How can i solve it ? Regards.

Posted by admin  · 13-10-2014 - 08:26

Hello, Please set a custom temp path; it's the most usual issue on Windows. Regards.

Posted by h_grados  · 13-08-2015 - 16:30

Hello, I have a similar problem. Never creates a .pdf file and rather creates 2 files .docx example_text.docx and tempDocX_55ccc34dd507a.docx it may be failing ?? I use windows This is the code I'm using. $docx->transformDocument('example_text.docx', 'example_text.pdf' ,dirname(__FILE__), array('método' => 'script', 'depuración' => true));

Posted by admin  · 14-08-2015 - 06:27

Hello, Please follow the instruction and steps explained on: http://www.phpdocx.com/documentation/conversion-plugin Regards.

Posted by h_grados  · 14-08-2015 - 17:00

Thanks, followed the steps of the guide and run successfully achieved the transformation with OpenOffice but I can not do it libreoffice I pulled this error: Warning: rename (example_text.pdf, example_text.pdf): The system can not find the file specified. (code: 2) in C: \ xampp \ htdocs \ manager-documentary \ classes \ TransformDocAdvLibreOffice.inc on line 86 but if I make the example_text.docx Segui steps here http://www.phpdocx.com/documentation/conversion-plugin/debugging-libreoffice Point 1 ok. successfully created the pdf Ok point 2 have only one installation of LibreOffice Point 3 Error the same error when I run from my local server. My file config is whether: [transform] ; transform options. Only available for Corporate and Enterprise licenses. OpenOffice by default ; libreoffice or openoffice method = "libreoffice" ; libreoffice installation path, absolute path path = "C:\Program Files (x86)\LibreOffice 5\program\"

Posted by h_grados  · 16-08-2015 - 04:17

I went back to reinstall libreoffice and put it in another way and it worked perfectly. now to test it on my linux server. Thank You.