This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Java in General and the fly likes Converting .doc to .pdf Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Converting .doc to .pdf" Watch "Converting .doc to .pdf" New topic
Author

Converting .doc to .pdf

Anand Shivadas
Greenhorn

Joined: Oct 17, 2000
Posts: 22
Hi All,
Anybody knows about converting .doc docuemnt to .pdf using Java, are they any API's or any third party tools, please help me.
Thanks,
Anand
Hari Gangadharan
Ranch Hand

Joined: Mar 08, 2001
Posts: 73
My work is also in the same area of document conversion. I have never come across a good Java API that can convert documents from/to PDF. JPedal and PDF Box are two APIs that allows you to extract text or Images from PDF documents. Still both of them are not guaranteed to work with all PDF files.
There are lots of Windows/COM based commercial packages that can convert your Word document to PDF. If you can explain more about your application, then I might be able to help you find alternatives.


<B>Hari Gangadharan</B><BR>Unix is user friendly..<BR>but it chooses to whom it is friendly with!
Anand Shivadas
Greenhorn

Joined: Oct 17, 2000
Posts: 22
Hi Hari
Thanks for your reply. Here is the my app, when user uploads .doc document, I need to convert it to .pdf file and send it to some other process. I heard about MIRA, but I guess it's not in java , all together it's new application, we need to submit request to it and get back the pdf.
Thanks,
Anand

Originally posted by Hari Gangadharan:
My work is also in the same area of document conversion. I have never come across a good Java API that can convert documents from/to PDF. JPedal and PDF Box are two APIs that allows you to extract text or Images from PDF documents. Still both of them are not guaranteed to work with all PDF files.
There are lots of Windows/COM based commercial packages that can convert your Word document to PDF. If you can explain more about your application, then I might be able to help you find alternatives.
Hari Gangadharan
Ranch Hand

Joined: Mar 08, 2001
Posts: 73
Anand -
Seems like it is best if your organization buy a DOC to PDF converter. Most Word to PDF converters runs only in NT. Notable one is Neevia document converter professional (http://www.neevia.com). It costs around $350 and can run as a service in NT.
However if you want to do that in a Unix platform then things are a little more difficult. It is almost impossible to get Word doc converted to PDF in Unix. You may consider using RTF files (World also creates RTF files) and there are some RTF converters that can convert it to PDF.
The point is your Java program will now be using Runtime class to execute the platform specific instructions, making it platform-dependent. It may be OK if you are creating a server-side batch program.
You may also think of posting this in
Planet PDF - they also have good forum.
[ November 13, 2002: Message edited by: Hari Gangadharan ]
Anand Shivadas
Greenhorn

Joined: Oct 17, 2000
Posts: 22
Thanks, Hari.
-Anand
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

Adobe also has a service on-line to convert documents to PDF over the web. So that would work on any platform. Depending on how the web site is done, you may even be able to pull the page into a Java JEditorPane possibly?
Just another option for you hopefully.


GenRocket - Experts at Building Test Data
Mag Hoehme
Ranch Hand

Joined: Apr 07, 2002
Posts: 194
Hi Anand,
there are a number of free Java APIs for PDF conversion (check a search engine for "java" "pdf"). I've toyed around a little bit with iText (http://www.lowagie.com/iText/). However, it requires some coding if you want to set up your own PDF converter.
Hope this helps.


Mag
Anand Shivadas
Greenhorn

Joined: Oct 17, 2000
Posts: 22
Thanks Mag, Gregg.
-Anand
Rodney Woodruff
Ranch Hand

Joined: Dec 04, 2001
Posts: 80
I don't know how much this will help but you should try the jakarta project for reading and writing microsoft doc formats in java. There might be an intermediary format that can be easily converted to pdf.
Apache POI


Hope This Helps
 
wood burning stoves
 
subject: Converting .doc to .pdf