[nycphp-talk] DOC to PDF conversion on a LAMP system?
irfan baig
irfanbaig78 at gmail.com
Sun Oct 8 20:39:28 EDT 2006
If this is a one-off, or rare requirement, just do an OpenOffice macro
on your local machine, as mentioned elsewhere in the thread.
Otherwise, if you need on the fly conversion, or even scheduled
conversion *on the webserver*, it's a little harder. One solution is
to use PyUNO.
PyUNO: First, this probably will not be possible on a shared server,
unless you can install Open Office, or if there is an OOo process
running and available. You will also need to install Xvfb and run OOo
through that on your server.
http://www.oooforum.org/forum/viewtopic.phtml?t=19790&highlight=
I suppose since OOo runs on a port, you could run it on your local
desktop box, or something, leaving it always on - I've never tried it.
Essentially the actual conversion involves running a Python script
(via exec(), for example) to communicate with OOo via PyUNO. Too bad
there isn't a php-uno binding or extension - at least some of your
problems would be solved ;)
On 10/6/06, Jon Baer <jonbaer at jonbaer.com> wrote:
> The thing is you are creating your own macros *in* OO and then
> running them CLI ... you would need X installed over a normal LAMP
> system still though I beleive ...
>
> http://www.xml.com/pub/a/2006/01/11/from-microsoft-to-openoffice.html
>
> - Jon
>
> On Oct 6, 2006, at 7:21 PM, csnyder wrote:
>
> > On 10/6/06, Michael Sims <jellicle at gmail.com> wrote:
> >
> >> 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).
> >
> > This might save you some reading and googling:
> > http://j.crecy.free.fr/index.php/2006/03/01/3-php_word_to_pdf
> >
> > Description is in French, but the code is English. Apparently you can
> > connect to the OO.org service manager using a socket. Neat!
> >
> > --
> > Chris Snyder
> > http://chxo.com/
> > _______________________________________________
> > New York PHP Community Talk Mailing List
> > http://lists.nyphp.org/mailman/listinfo/talk
> >
> > NYPHPCon 2006 Presentations Online
> > http://www.nyphpcon.com
> >
> > Show Your Participation in New York PHP
> > http://www.nyphp.org/show_participation.php
>
> _______________________________________________
> New York PHP Community Talk Mailing List
> http://lists.nyphp.org/mailman/listinfo/talk
>
> NYPHPCon 2006 Presentations Online
> http://www.nyphpcon.com
>
> Show Your Participation in New York PHP
> http://www.nyphp.org/show_participation.php
>
--
Best,
Irfan Baig
More information about the talk
mailing list