Forum OpenACS Q&A: Re: server side document to .pdf conversion

Posted by Radamanthus Batnag on
I ran into a similar problem - converting M$ Word .doc files to text, and the OpenOffice solution seems to have matured a lot since the start of this thread.

Here's a Java example program for batch conversion of text files from any supported OpenOffice format to any other supported OpenOffice format:

Posted by zet ucu on
How to do it with Java:

import officetools.OfficeFile;
FileInputStream fis = new FileInputStream(new File("test.doc")); // works with xls also
FileOutputStream fos = new FileOutputStream(new File("test.pdf"));
OfficeFile f = new OfficeFile(fis,"localhost","8100", true);

All possible convertions:
doc --> pdf, html, txt, rtf
xls --> pdf, html, csv
ppt --> pdf, swf
html --> pdf

Maybe useful:
HTML to PDF with PHP, Java or ASP