wood burning stoves 2.0*
The moose likes Java in General and the fly likes convert  msword  doc  to  pdf Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "convert  msword  doc  to  pdf" Watch "convert  msword  doc  to  pdf" New topic

convert msword doc to pdf

t raju

Joined: Jun 02, 2005
Posts: 5
How could i convert word doc to PDF ..
Please give any sample code to do so..
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 41073
I'm not aware of a Java library that can do this in a generic way. There is POI (from Jakarta) which lets you read Word (and Excel) files, and there's iText (on SourceForge) which lets you create PDF files. With these you could stitch something together, but probably not a converter that works for each Word document.

Ping & DNS - my free Android networking tools app
Khan Malamir

Joined: Sep 09, 2005
Posts: 16
Both formats are quite complex. Maybe a good solution in this case will be to find a pdf printer (software that installs a virtual printer) and print the doc files to it - the printer will create the PDF for you.

If there is an export option in your doc file editor you could look for a way to call it (via API or command-line option).

Another solution could be to open the doc file in OpenOffice, then export it as PDF, this can be done using the UNO API provided by OpenOffice.
wood burning stoves
subject: convert msword doc to pdf
Similar Threads
How to convert doc files to pdf in Struts2
convert to pdf file format
how to convert doc file to pdf
Converting DOC to PDF
pdc viewer software needed