Convert DOC and XLS to PDF

My team came across a new solution which allow conversion of ms office formats, especially doc and xls to pdf. Solution is provided by this guy on this page: DOC to PDF with Java

How it works:

**[COLOR=#eb2e32]Java Code[/COLOR]**
import officetools.OfficeFile; // from officetools.jar

FileInputStream fis = new FileInputStream(new File(“test.doc”));
FileOutputStream fos = new FileOutputStream(new File(“test.pdf”));

OfficeFile f = new OfficeFile(fis,“localhost”,“8100”, false);

f.convert(fos,“pdf”);

Are you using a similar solution in Java or PHP?

I am currently trying to find more solutions and to compare them for quality and speed.

Thanks.