Java — Open Office [patched]
// Close the document context.getServiceManager().disposeInstance(document); catch (Exception e) System.err.println("Error creating document: " + e.getMessage());
You need juh.jar , jurt.jar , ridl.jar , unoil.jar from OpenOffice installation ( program/classes/ ). java open office
File inputFile = new File("document.docx"); File outputFile = new File("document.pdf"); // JODConverter handles the communication with OpenOffice/LibreOffice JodConverter.convert(inputFile).to(outputFile).execute(); Use code with caution. Source: JODConverter Wiki 2. Programmatic Document Manipulation // Close the document context
storable.storeToURL("file:///C:/output/myfile.pdf", filterProps); You need juh.jar