1

I have this requirement:

  1. Generate a Word document from template using poi.jar. The generated doc will have dynamic values as well as the formatting needed.

  2. Convert the generated doc as it is to PDF. I don't want to apply any formatting again while generating the PDF.

Is there any open source Java API available to do this?

halfer
  • 19,824
  • 17
  • 99
  • 186
user1383748
  • 19
  • 1
  • 2

1 Answers1

4

OpenOffice.org offers an API that can do the job for you.

Please note that this question has been answered many times on StackOverflow (and over the web), see this answer for example.

Community
  • 1
  • 1
Alexis Pigeon
  • 7,423
  • 11
  • 39
  • 44
  • 1
    @user138748 - in the answer linked by Alexis the Docmosis library mentioned can provide template functionality from word docs. Though if you have *already* solved that using POI, JODConverter might be what you want for the PDF bit. – Paul Jowett May 10 '12 at 08:28