Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Converting .doc to .pdf

 
Anand Shivadas
Greenhorn
Posts: 22
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Anand Shivadas
Greenhorn
Posts: 22
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 22
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, Hari.
-Anand
 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Mag Hoehme
Ranch Hand
Posts: 194
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Anand Shivadas
Greenhorn
Posts: 22
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Mag, Gregg.
-Anand
 
Rodney Woodruff
Ranch Hand
Posts: 80
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic