• Post Reply Bookmark Topic Watch Topic
  • New Topic

Document Conversion PDF to MS word doc and vice versa  RSS feed

 
Abhin Thomas
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello everyone,
Can you tell me how to convert MS word documents to PDF format and vice versa.. I'm working on a project which requires me to do this..
Is there any jar files specific for this kind of conversion?
Do we have to convert these into XML format first? If so, how to go about it.. Thanks in Advance,
Abin Thomas
 
Kail Limas
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well I know only one way to read an older MS Word Document, and that's POI. I think you can also write with it but it has only limited abilities there.

With PDFBox you can read and write PDF Documents. YOu would have to look into that.

And there are of course converters for it outside of java. Depending on what you want to do you might want to look into that.
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch.

POI can extract the text of DOC files, but not the formatting. You could then use iText or PDFBox to create PDFs from the text.

Alternatively, OpenOffice has a Java API, and it can both read DOC files, and create PDFs.

Links to all these are in the AccessingFileFormats FAQ page.
 
Abhin Thomas
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot! I was able to convert text to pdf using iText.. However, i still have problems trying to implement FOP or Open Office.. Especially Open office as i couldn't find any suitable tutorials or examples.. Please do tell me, if you know any link with good examples..
In case of POI, most tutorials that i came across was for Excel.. i need to convert word files.. So, if you know any links with HWPF examples, that'd be great!
thanks and regards,
Abin
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The HWPF Quick Guide talks about how to extract text from a Word document.
 
Paul Clapham
Sheriff
Posts: 22843
43
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bindu Padmanabhan,
Your post was moved to a new topic.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!