Page 1 of 1

invoke Impress via ant (or shell) to create .pdf

PostPosted: Sat Feb 16, 2008 8:31 pm
by brutzman
i have a bunch of .odp presentations that occasionally get collected into a .zip archive.

would like to automate the production of .pdf versions

wondering, how can i invoke Impress using an ant build.xml script to create .pdf ?

alternatively, how can i invoke Impress to create .pdf via command line?

Re: invoke Impress via ant (or shell) to create .pdf

PostPosted: Sun Feb 17, 2008 9:54 am
by hol.sten
brutzman wrote:alternatively, how can i invoke Impress to create .pdf via command line?

Try this for example: http://www.oooforum.org/forum/viewtopic.phtml?t=3772
Although the title suggests, that the macro covers only converting WORD to PDF, you can easily alter that to ANY of OOo's file formats to PDF. The only line you must change is the line setting the "FilterName" for storing the PDF. In the linked thread it looks like this:
Code: Select all   Expand viewCollapse view
MakePropertyValue( "FilterName", "writer_pdf_Export" ),_
This is the PDF export filter for OOo's text documents.

To export an Impress file format change that line to:
Code: Select all   Expand viewCollapse view
MakePropertyValue( "FilterName", "impress_pdf_Export" ),_
You'll find more available PDF export filters in this list: http://wiki.services.openoffice.org/wik ... st_OOo_2_1