Search code examples
linuxpostscriptlibreoffice

Want to convert doc into ps format through programming


I want to convert doc to ps(post script) format programatically.I know there is an utility available in LibreOffice that does this conversion but I don't want to install Libreoffice on the Client machine instead I want to reuse the source code of LibreOffice to develop this utility.I know it is a very cumbersome task but at least if someone can give me any kind of basic approach on how to do this or any other way doing it programatically.

I want it for Linux OS.

Thanks.


Solution

  • There is no way you can get away with striping the DOC importer and postscript generator from libreoffice just for this - you'd need a considerable army in men/hours.

    Either the ready made Python script which runs on top of Libreoffice you already mentioned - if you want it to work at all - I hope you know it does not need a graphical display to run, and it can be done as "command line" (usually you will want to keep LibreOffice running in the background).

    If you really want to roll your own app for this, you should check the code for koffice/calligra instead - It will be built around Qt architecture - I had not looked at it recently, but it will be more modular and reusable than libreoffice's - re-using the doc-importer and ps exporter from calligra is a job I believe could be done by a single person along some reasonable time (that will varies according to the person familiarity with the Qt/C++ enviroment it is built in) URLs:

    http://www.calligra.org http://community.kde.org/Calligra/Building