Forum


Replies: 6   Views: 3390
Tranforming docx to...
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 sgale  · 30-01-2013 - 23:29


Is it possible to transform an existing document (for example, one I've merged with others) into a PDF or ODF format? So I'd be reading in an existing document, then transform it back out to anther doc flavor.

Can't seem to get it to work.

Posted by admin  · 11-04-2013 - 12:13

Hello,

What version of phpdocx are you using?.

Regards.

Posted by sgale  · 11-04-2013 - 12:13

PHPDOCX 3.0 (just bought it 3 days ago.)

I can see my LibreOffice running in headless mode, netstat -na on port 8100.

When I run the "Transform.php" I also see two new connections get established to this port, so it looks like PHPDOCS is talking to OOffice. But nothing happens. No document gets created.

same result for pdf, rtf or odf - nothing seems to work here.

Posted by admin  · 11-04-2013 - 12:13

Hello,

Please do a quick test: run Transform.php example in CLI mode and paste your output.

Regards.

Posted by sgale  · 11-04-2013 - 12:13

Here you go... appears the RTF stuff will get created, but not the odt, pdf, html or doc

OpenSuse 12.1
Linux linux-1too 3.1.10-1.16-desktop #1 SMP PREEMPT Wed Jun 27 05:21:40 UTC 2012 (d016078) x86_64 x86_64 x86_64 GNU/Linux

Libre Office 3.5

libpng12.so is installed... but libpng14.so is the one that is available in my /usr/lib directory.

Also tried upgrading to phpdocx 3.1 today. Same issues. Same error as below.



linux-1too:/srv/www/htdocs/phpdocx/examples/advanced # php Transform.php
/srv/www/htdocs/phpdocx/classes/../lib/OdfConverter: error while loading shared libraries: libpng12.so.0: cannot open shared object file: No such file or directory
Jan 31, 2013 5:11:40 PM com.artofsolving.jodconverter.openoffice.connection.AbstractOpenOfficeConnection connect
INFO: connected
Jan 31, 2013 5:11:40 PM com.artofsolving.jodconverter.openoffice.connection.AbstractOpenOfficeConnection disposing
INFO: disconnected
Exception in thread "main" java.lang.IllegalArgumentException: inputFile doesn't exist: /tmp/tempOdt_510aec1b7c5f0.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)
linux-1too:/srv/www/htdocs/phpdocx/examples/advanced #

Posted by admin  · 11-04-2013 - 12:13

Hello,

How did you installed libpng12.so.0 library?. Maybe you didn't update your shared libraries cache using ldconfig?.

Regards.