Holy! I could not believe this until I saw the promotion email. Literally, I was using iText about 1.5 years ago to generate a dynamic pdf document (boarding pass) for user's printing. I mean no offense, but the interface is aweful and full of bugs. Even though I successfully completed the project, I hate iText. The whole task was tedious! I managed to use JasperReport to cope with iText. But I found to create xml format template was another nightmare. So I adopted iReport, a visual tool to creat xml template files. So I ended up with this chain: iText --> JasperReport --> iReport However, iReport is another out-of-box-no-warrant toolkit filled with terrible number of bugs.
I haven't touched iText for at least a year or so. Recently, I successfully persuaded my boss to let customers download a report in CSV format instead of fancy pdf. I was so happy my boss listened to me.
I am wondering if "iText JasperReport iReport" is still the only path to follow in today's worl? If so, I suggest everyone try best to avoid using pdf.
I have implement PDF generation using Apache FOP (http://xmlgraphics.apache.org/fop/) to great success in my project. We had report requirements to generate Excel and PDF documents in a dynamic way (the users could dictate the selected columns and rearrange the order of the columns in the report).
We dynamically generated the XSL used for FOP from within our generation code, and the PDF rendering worked without much trouble. The excel part was another story though, but the Apache POI HSSF implementation did its job finally.
I did some reading on iText early on for the project but never really played with it. I am happy to note that I didnt miss much
to be fair, Nipun, I was in rush to implement a fancy-looking pdf document within 2 days (7 boarding pass pages with dynamic information) Tight schedule might cause the toughness, but I ended up spending 2 weeks debugging. Just give you a few examples: - some jar files (I don't remember which one, might come from JasperReport) needs to be in system classpath in order to be loaded by JVM! I was totally mad about this and ended up setting up system.properties from a servlet. I paid price for this to have an exploded war folder (instead of an archived war file) in production! - 2D barcode feature is awful in iText. I couldn't even figure out what its API document is talking about. - At that time, developer's guide is not free ( I don't know what's the current situation, I don't care any more). I had my boss to buy a pdf document with 26$ or so. This is totally ridiculous because iText is claimed to be open source.
Hence, I suggest every serious developer try his/her best to find an alternative.
I have worked a lot on creating PDF documents using Apache FOP in 2001/02. ITs a wonderful tool.. Probably the best one. I have created very heavy PDFs(upto 19MB) dynamically without much issue with really great performance. I would recommend to use it instead of any other tools. PDF page design is also not diffult using XSL. [ November 13, 2006: Message edited by: Purvesh Vora ]
Regards,<br />Purvesh<br />SCJP, SCBCD, IBM Exam #486
I started using Jasper Reports thinking it would save me some time but found it too restrictive when working with data objects. I moved over to working directly with iText and found it very good. It's down to the nuts and bolts of constructing a PDF so might not be very good for a quick fix but is great when you need some freedom to build the PDF you want.
I use pdfs to deliver dynamic reports direct from a servlet. I've constructed a pretty looking pdf with tables, logos, headers/footers, dynamic graphs and backgrounds that uses only about 50 lines of code.... all by just following the free examples on the website.
Thanks alot Bruno!! Your good work is greatly appreciated.
I've actually had good experiences with iText, too.
That said, initially i wasn't a fan, but as i used it more and built up a library of convenience functions, i can produce some pretty good stuff.
That said though, its not all perfect, and hense the question:
Bruno, in all the versions i've tried of iText there doesn't seem to be a great deal of consistency where borders are concerned. I've seen situations where a top border has been set to a particular thing, but visually you can see that it varies along the top of a table.
Also, a given thickness might look different in different parts of the pdf document. Is this one of the intracacies of working with the pdf format, or is this something that could be fixed in a later version ?
Originally posted by James Quinton: At that time, developer's guide is not free (I don't know what's the current situation, I don't care any more). I had my boss to buy a pdf document with 26$ or so. This is totally ridiculous because iText is claimed to be open source.
If you bought a $26 book 1.5 years ago, you have been ripped off. The book 'iText in Action' is the first book on iText ever. The only alternative is a free online tutorial on iText: http://itextdocs.lowagie.com/tutorial/ also written by me, but it's not even close to what is offered in the book. I know iText isn't perfect, but reading about your experience I have the feeling that you are aiming at the wrong target: you are talking about using JasperReports/iReport; tools that use iText as a PDF engine. Based on what you write, I think you haven't been using iText directly. The book you bought was probably a book on JasperReports, not on iText.
Originally posted by Michael Dekmetzian: Also, a given thickness might look different in different parts of the pdf document. Is this one of the intracacies of working with the pdf format, or is this something that could be fixed in a later version ?
I'm happy to give examples if that would help.
Yes, I need some examples to understand the problem. Also: does the problem concern printed pages, or does the problem only occur on the screen. When viewing a PDF on different screen, the thickness of a line can be different. When printed however, the lines are OK. This is a device-related problem.