How do i use php to communicate with openoffice
I am having ubuntu and have openoffice installed. Is there any way I can use php to convert my docs to开发者_开发知识库 odf? Is there any way to make php communicate with installed app?
Everything you need is PyODConverter (http://artofsolving.com/opensource/pyodconverter)
It is simple and fast way to convert documents using OpenOffice/LibreOffice via command line. You can pass the command from PHP using exec()
1) Start Openoffice on server as a service using libreoffice -headless -accept="socket,host=127.0.0.1,port=8100;urp;" -nofirststartwizard
. Change command "libreoffice" to "soffice" (for openoffice, if you have one).
2) Download DocumentConverter.py and use it like this: python DocumentConverter.py test.docx test.odf
And that's it.
精彩评论