NYCPHP Meetup

NYPHP.org

[nycphp-talk] DOC to PDF conversion on a LAMP system?

Michael Sims jellicle at gmail.com
Fri Oct 6 14:49:24 EDT 2006


On Friday 06 October 2006 1:20 pm, Stephen Musgrave wrote:

> We have files on a Unix web server in various formats, the foremost
> is Word DOC.  We have a script that runs in PHP that gathers all of
> the documents and creates a PDF document stuffs the files in there.
> But the problem is that we can't stuff a Word document into a PDF
> document without first converting it to a PDF.  What I will need to
> be able to do is covert that document via PHP or PHP's command line
> capability (presumably using the exec() command).  We will then
> return control to our compilation script, pull in the newly converted
> file and then we're done.

OpenOffice can read Word, output PDF, has an API, and is available for 
Windows, Linux, Unix, etc.

Here's someone who did it on a Windows machine:

http://www.wynia.org/wordpress/word-to-pdf-converter-in-php-word2pdf/

Doing it on a Unix machine is left as an exercise for the reader (or 
Googler).


Michael Sims



More information about the talk mailing list