Forum OpenACS Q&A: Re: automatic file conversion via openoffice...

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