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

iText could even be in a book?!

 
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
James Quinton
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Wow, I have had great success with iText. I have used it for generating entire Tax Form filings and Audit forms for a State as well as online job applications for another State.

I read in a pdf and overlay the text onto the pdf form.

It took me a while to find my best practices but now I use it quite a lot.

I write in Java and Struts.

Kristen
 
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I too have had good experiences with iText.

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.

Ed.
 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ?

I'm happy to give examples if that would help.

For the most part you've done some fantastic work
 
author
Posts: 90
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
 
Bruno Lowagie
author
Posts: 90
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic