In your projects you may need to convert DOC files to PDF.

The presentation below will try to guide you how to do it.

If you want to contribute with another solution, please feel free to contact me.

DOC to PDF with Java

You can use be available on the same computer or in your network) for document conversion.

Besides DOC to PDF, there are also possible other conversions:
doc --> pdf, html, txt, rtf
docx --> pdf
xls --> pdf, html, csv
xlsx --> pdf
ppt --> pdf, swf
html --> pdf

Code example

import officetools.OfficeFile; // this is my package, officetools.jar // uses streams for I/O FileInputStream fis = new FileInputStream(new File("test.doc")); FileOutputStream fos = new FileOutputStream(new File("test.pdf")); // suppose runs on localhost, port 8100 OfficeFile f = new OfficeFile(fis,"localhost","8100", false); // optional feature: can be used to replace a string in .doc, .odt or .sxw files // thus can be used to populate templates f.replaceAll("aaa","bbb"); // convert to pdf f.convert(fos,"pdf");

How to obtain this solution

officetools.jar is not free, in order to sustain future developments; however the price is reasonable.
You will get both jar and sourcecode, project details, javadoc, setup instructions, examples.
If you want to use this solution in your projects, please contact me for a price quotation: