• Post Reply Bookmark Topic Watch Topic
  • New Topic

Doc file to PDF generation  RSS feed

 
Rajendar_reddy
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi i want to generate pdf file from .doc file,
if any body done before pl help
i am trying with FOP,

Thanks,
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't think there is a general solution, at least not one implemented in Java. FOP reads XML files, not Doc - you could try saving the Doc files in XML format, and have FOP works on that. I have never seen the Word XML format, though, so I don't know how much content and formatting is exposed through that.
One other option might be to use the Jakarta POI library to read the word file, and then generate the PDF with a library like iText. That would be a lot of implementation work, though, except maybe for the simplest Word documents.
 
Joe Ess
Bartender
Posts: 9436
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I tried using POI to programmatcally translate Word Doc's to HTML. The Excel functionality is pretty mature but the Word functionality is unusable (it looks like they're having trouble finding someone to support that code). I've been using OpenOffice.org to do the job. OOo can generate PDF's, so maybe it is an option for you. The OOo API is non-trivial but there's tons of examples in the API download and more examples and discussion in the support forum.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!