• 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:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Create pdf like word merge

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

I have requirement where i have to create a PDF document, same as word merge. The concept is, the data is populated in template file (tab separated) and then template file is merged with pdf document having placeholder for each field in template file.

Early response is appreaciated.
Regards.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to JavaRanch.

PDFs can't be merged like other file formats. There is very little that can be done with them once they have been created. A better approach would be to generate them dynamically (using a library like iText) for each set of data.

By the way, this forum is for diversions, not for actual questions. Someone will move the thread to a more appropriate forum.
 
Ranch Hand
Posts: 1252
Spring Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have tried iText earlier but it was not working fine...



 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, it does work nicely in general. If you're having problems with it, feel free to post those to the "Other Open Source projcts" forum, and we'll try to help you.
 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
PDFBox might be worth a look: http://www.pdfbox.org/

It seemed to be easier to use for me and had a several samples. We used it to concatenate PDF files.

On a previous project we used Apache FOP to create PDFs from XML templates. Should be plenty of examples on this.

Another option is to actually just do a Word merge using Jawin or other JNI tool depending on your requirements.
 
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Moving to the Other Open Source projects forum.

Dave
 
reply
    Bookmark Topic Watch Topic
  • New Topic