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.
I just purchased the pro version of phpdocx with the conversion plugin.
I am trying to use examples/advanced/Transform.php to test the docx to pdf functionality. The docx file is generated correctly but the pdf file is not. There are no PHP errors logged.
Anyone know what the issue might be?
Thanks
Posted by admin
· 11-04-2013 - 12:13
Hello,
Are you running openoffice in headless mode?
Regards.
Posted by asher
· 11-04-2013 - 12:13
No, all I have done is installed phpdocx and the required php modules on my server. Do I need to install OO too? If so, can you point me towards the documentation that tells me all of the things I need to set up to get phpdocx working.
Thanks
Posted by admin
· 11-04-2013 - 12:13
Hello,
OpenOffice for Linux OS is included in phpdocx pro + plugin and corporate versiones. But you can use any version of OpenOffice.
To run openoffice in headless mode execute this command:
lib/openoffice/program/soffice is the path to OpenOffice executable.
Regards.
Posted by asher
· 11-04-2013 - 12:13
The above command did not work (Ubuntu 12.04)
lib/openoffice/program/soffice: 99: /var/www/phpdocx/lib/openoffice/program/../basis-link/program/pagein: not found
lib/openoffice/program/soffice: 109: /var/www/phpdocx/lib/openoffice/program/../basis-link/ure-link/bin/javaldx: not found
lib/openoffice/program/soffice: 129: /var/www/phpdocx/lib/openoffice/program/soffice.bin: not found
No command 'urp' found, did you mean:
Command 'arp' from package 'net-tools' (main)
Command 'rup' from package 'rstat-client' (universe)
Command 'unp' from package 'unp' (universe)
urp: command not found
bash: .: -n: invalid option
.: usage: . filename [arguments]
Do you have documentation anywhere that tells me how to set your software up? So far it has been very frustrating not having any guides to go by.
Posted by admin
· 11-04-2013 - 12:13
Hello,
Please download the latest version of phpdocx, that uses a new version of openoffice.
To use plugin conversion you can use any version of openoffice (3.2 or greater): included one in phpdocx package or your custom install (Windows, Mac or Linux). The version included within phpdocx is for 32bits machines, so if you have a 64 bits distro you need to install the ia32 package (ia32-libs).
After you have openoffice installed or copied, init it in headless mode (using a script or a command). Now you can instanciate CreateDocx or TransformDocxAdv classes to do transformations.
The next version of phpdocx will include a more detailed guide about this plugin and several improvements.
Regards.
Posted by complexii
· 11-04-2013 - 12:13
[quote][b]Quote from admin on October 1, 2012, 07:55[/b]
The next version of phpdocx will include a more detailed guide about this plugin and several improvements.
[/quote]
is this now available? we've installed oo 64bit via cpanel rpm. we can get is running using your oo init script. we continue to get errors when trying to run the following code:
$text = 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, ' .
'sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut ' .
'enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut' .
'aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit ' .
'in voluptate velit esse cillum dolore eu fugiat nulla pariatur. ' .
'Excepteur sint occaecat cupidatat non proident, sunt in culpa qui ' .
'officia deserunt mollit anim id est laborum.';
** (OdfConverterTestStatic.exe:25557): CRITICAL **: _wapi_shm_file_open: shared file [/.wapi/shared_data-complexi3.serverphase.com-Linux-i686-312-12-0] open error: No such file or directory
** (OdfConverterTestStatic.exe:25557): CRITICAL **: _wapi_shm_attach: shared file [/.wapi/shared_data-complexi3.serverphase.com-Linux-i686-312-12-0] open error
/home/napkinsc/public_html/phpdocx/corp/classes/../lib/OdfConverter: symbol lookup error: /home/napkinsc/public_html/phpdocx/corp/classes/../lib/OdfConverter: undefined symbol: g_assertion_message_expr
Jan 7, 2013 11:10:15 AM com.artofsolving.jodconverter.openoffice.connection.AbstractOpenOfficeConnection connect
INFO: connected
Jan 7, 2013 11:10:15 AM com.artofsolving.jodconverter.openoffice.connection.AbstractOpenOfficeConnection disposing
INFO: disconnected
Exception in thread "main" java.lang.IllegalArgumentException: inputFile doesn't exist: /tmp/tempOdt_50eb0176ec60b.odt
at com.artofsolving.jodconverter.openoffice.converter.AbstractOpenOfficeDocumentConverter.convert(AbstractOpenOfficeDocumentConverter.java:90)
at com.artofsolving.jodconverter.openoffice.converter.AbstractOpenOfficeDocumentConverter.convert(AbstractOpenOfficeDocumentConverter.java:74)
at com.artofsolving.jodconverter.openoffice.converter.AbstractOpenOfficeDocumentConverter.convert(AbstractOpenOfficeDocumentConverter.java:70)
at com.artofsolving.jodconverter.cli.ConvertDocument.convertOne(ConvertDocument.java:154)
at com.artofsolving.jodconverter.cli.ConvertDocument.main(ConvertDocument.java:133)