There’s a handy utility called unoconv that lets you batch/mass convert OpenOffice.org files to any format OpenOffice supports such as PDF, Word DOC, or HTML.
Here’s how to use it in Linux:
wget http://dag.wieers.com/home-made/unoconv/unoconv-0.3.tar.bz2 tar xjf unoconv-0.3.tar.bz2 cd unoconv ./unoconv --listener & echo $! > unoconv.pid # To convert all ODT files in ~/Documents to Word DOC format: ./unoconv -f doc ~/Documents/School/*.odt kill `cat unoconv.pid` rm unoconv.pid
The two important commands are:
unoconv --listener–to start the listenerunoconv -f format path/to/odt/documents–to actually convert files
Now find me a way to automatically generate OO documents from a template or something using my data and we may have a decent pdf generator.
Openoffice writer files are zip files containing among others the XML files styles.xml and content.xml. You may substitute the content.xml files independently of the styles.xml files. Thus, you could generate the content.xml from your data with any XML transformation language (such as XSLT or XQuery), and then zip them together with the styles.xml file, and subsequently process them with unoconv to pdf files… Just a thought