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

Collapse
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);
f.convert(fos,"pdf");
---------------------------------------------------

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

Maybe useful: http://dancrintea.ro/html-to-pdf/
HTML to PDF with PHP, Java or ASP