Connecting Tech Pros Worldwide Help | Site Map

Convert DOC and XLS to PDF

Newbie
 
Join Date: Mar 2009
Posts: 3
#1: Mar 6 '09
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: http://www.dancrintea.ro/xls-to-pdf/

How it works:
Expand|Select|Wrap|Line Numbers
  1. import officetools.OfficeFile; // from officetools.jar
  2.  
  3. FileInputStream fis = new FileInputStream(new File("test.doc" ));
  4. FileOutputStream fos = new FileOutputStream(new File("test.pdf" ));
  5.  
  6. OfficeFile f = new OfficeFile(fis,"localhost","8100", false);
  7. f.convert(fos,"pdf" );
  8.  
Are you using a similar solution in Java(or even in PHP)?

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

Thanks.
Newbie
 
Join Date: Oct 2009
Posts: 3
#2: Oct 2 '09

re: Convert DOC and XLS to PDF


I am using the same solution with good results.

Before including OfficeTools in our project we've done some research and we did not find other solutions, only maybe a bridge Java-COM and use Microsoft API - not so appealing because then you are blocked on Windows environment.
Reply