aspose file tools*
The moose likes Other JSE/JEE APIs and the fly likes How to generate PDF Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "How to generate PDF" Watch "How to generate PDF" New topic
Author

How to generate PDF

Saathvik Reddy
Ranch Hand

Joined: Jun 03, 2005
Posts: 228
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.
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19670
    
  18

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.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Saathvik Reddy
Ranch Hand

Joined: Jun 03, 2005
Posts: 228
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.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41515
    
  53
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).


Ping & DNS - my free Android networking tools app
Darya Akbari
Ranch Hand

Joined: Aug 21, 2004
Posts: 1855
Jasper Reports is good for what you want. Use iReport as your Visual Designer for your monthly Jasper Report. More on http://jasperforge.org/


SCJP, SCJD, SCWCD, SCBCD
Saathvik Reddy
Ranch Hand

Joined: Jun 03, 2005
Posts: 228
Thanks a lot for all you inputs. I am planning to use Jasper Reports with iReport designer.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: How to generate PDF