How to actually use this package in my php script?

Asked by gvanto

The documentation on this package leaves quite a bit to be desired:

- How do I create a sample (php) script which will convert a document?

The http://localhost/docvert/sample-use.php is great, but if I want to create my own script, I do not want to troll through the samples to figure out how to do it ... a simple sample script perhaps?

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu docvert Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
holloway (matthew-holloway) said :
#1

Hi gvanto,

Docvert has a web service interface, a command line interface, and MS Word integration, but no decent PHP local library support. It hasn't currently been designed for this use. I'll put this on the TODO list though.

In the meantime you could either

1) write an HTTP client (perhaps by using Docvert's HTTP client at lib/http.php and the pullpage() method) to use the web service interface.

2) hack on Docvert. Have a look at web-service.php ... particularly the last couple of lines and how they call processConversion() to actually do the work. You would then just have to modify the core/lib.php at around line 100 where it's got an if/else that checks $afterConversion and add a new part that like $afterConversion='returnFile' that returned the path to the zip (or perhaps the data itself).

Can you help with this problem?

Provide an answer of your own, or ask gvanto for more information if necessary.

To post a message you must log in.