Hey guys,
I hope this qualifies as a gotcha, but since it bugged me for two weeks, and i posted on this mailing list and did not get any replies, i think it is worth mentioning.

The idea is to use OOo to export documents from the command line as PDF. The easiest way i found (i found 3) is the following:
First run spadmin, which would bring the OOo printer administration. It might not be in your path so look for it. (Mine was in /usr/lib/openoffice2/spadmin). Now create a new printer and assign it as a PDF converter and use the Adobe Distiller driver.
Once that is done, you can run the following command to export documents:
oowriter2 -invisibile -pt <printer_name> <file_name>... and there you have it.
Two notes worth mentioning are:
1) If the original file was called test.odt then the resulting file would be called test.odt.pdf
2) On the OOo forums, they say that running with the -invisibile option leaves the OOo instance running after the command finishes. But i searched the running processes list and couldn't find anything.
This method also works on OOo 1.1.4

The other two methods i found (but never managed to get working) are:
1) writing an OOo macro and calling it from the command line. The following link should provide you with information about how to write the macro: http://www.oooforum.org/forum/viewtopic.phtml?t=3772
2) Somehow print to a PostScript (PS) printer, and using the command ps2pdf on the resulting file to generate the PDF.

Hope that helps somebody, especially if one intends to convert a large group of documents.

--
Al-Faisal El-Dajani
Tel: +962-7-77 799 781
P.O Box: 140056
11814 Amman, Jordan

May the source be with you
_______________________________________________
General mailing list
[email protected]
http://mail.jolug.org/mailman/listinfo/general_jolug.org

Reply via email to