• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to generate PDF

 
Ranch Hand
Posts: 228
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I have to generate a PDF (monthly statements for a phone account). Could anyone please suggest simple API to dynamically generate PDF files.

Thanks,
Srikanth.
 
Sheriff
Posts: 22783
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
http://www.google.com/search?client=opera&rls=en&q=java+pdf&sourceid=opera&ie=utf-8&oe=utf-8
iText comes up top, and I've heard good stories about that one.
 
Saathvik Reddy
Ranch Hand
Posts: 228
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Rob Prime wrote:http://www.google.com/search?client=opera&rls=en&q=java+pdf&sourceid=opera&ie=utf-8&oe=utf-8
iText comes up top, and I've heard good stories about that one.



I learned that iText and Jasper Reports can be used to generate pdf. Could anyone please let me know in what context one should be choosen over the other?

Thanks,
Srikanth.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
iText is an API - so every bit of output needs to be specified by calls to that API at appropriate locations in your code. As such it's good for output that's not very regular. See http://faq.javaranch.com/java/ItextExample for an example.

Jasper is good for reporting situations, where you have the same layout repeatedly, like header-table-footer on all pages.

Another option is Apache FOP, if the data to be displayed is available as XML.

Note that both FOP and Jasper use iText underneath, so if there's something those two can do, then iText by itself can do it too (with more code you need to write).
 
Ranch Hand
Posts: 1855
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Jasper Reports is good for what you want. Use iReport as your Visual Designer for your monthly Jasper Report. More on http://jasperforge.org/
 
Saathvik Reddy
Ranch Hand
Posts: 228
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks a lot for all you inputs. I am planning to use Jasper Reports with iReport designer.
reply
    Bookmark Topic Watch Topic
  • New Topic