Hi!
I have some code that builds up a word document, and is supposed to save it as a pdf file. I have the following code that does the saving:
// Refresh the values of DOCPROPERTY fields
FieldUpdater updater = new FieldUpdater(docxPackage);
updater.update(true);
// .. the FOSettings object
FOSettings foSettings = Docx4J.createFOSettings();
foSettings.setWmlPackage(docxPackage);
OutputStream os = new java.io.FileOutputStream(name);
// Don't care what type of exporter you use
// Docx4J.toFO(foSettings, os, Docx4J.FLAG_EXPORT_PREFER_XSL);
Docx4J.toPDF(docxPackage, os);
// Clean ...