Win a copy of Escape Velocity: Better Metrics for Agile Teams this week in the Agile and Other Processes forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Frank Carver
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • fred rosenberger

Doc file to PDF generation

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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,
 
Rancher
Posts: 43028
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Not looking good. I think this might be the end. Wait! Is that a tiny ad?
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic