Am 07.12.2009, 10:25 Uhr, schrieb Mike Scott <[email protected]>:
Almost what you want, but in OOo basic I'm afraid. The error checking is
poor (truthfully, non-existent) because I use this from a web php
script, not interactively.
No problem with OOo Basic. I used to know C64 Basic, worked with MS Office
VB, so the general stuff is not so hard to grasp.
That doesn't mean I'd understand all of this, but I'm not afraid of
running it :)
To use from command line, you'll need something like
/usr/local/bin/openoffice.org-2.3.0-swriter -headless
"macro:///Standard.conversions.SaveAsPDF(\"$1\", \"$2\")"
I had to test a bit, but on Linux (SuSe 11.1, csh shell) with OOo3 it goes
like this:
openoffice.org3 -headless
"macro:///Standard.convert.SaveAsPDF(/absolute/path/to/file.odt)"
The quotes are necessary to deal with brackets. The shell would otherwise
insert spaces before and after them
-invisible instead of -headless works too, but produces an ugly error
statement after producing the pdf.
Other properties of the pdf can probably be influenced by using
"MakePropertyValue()" to set the properties described in
http://wiki.services.openoffice.org/wiki/API/Tutorials/PDF_export
(thank you Ariel for pointing me to it!)
I'll try that later and post the results here (in case anyone else is
interested).
Big Cheers,
Zak
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]