A Review of 'iText in Action'

Reviewed by David Gilbert, 6 December 2006


iText, a free PDF generating library written by Bruno Lowagie and Paulo Soares, is a gem among free software projects. I've been a consumer of the iText product for a number of years now, so when Bruno Lowagie announced his plans to write a book about iText, I was eager to get my hands on a copy. Fortunately, Manning (the publishers) asked me to write a review of the book, so I got my wish even before the book was officially published. I've now read through all 650+ pages of 'iText in Action', some parts a couple of times, and here is my review.


Title: iText in Action
Author: Bruno Lowagie
Publisher: Manning Publication Co
Pages: 657
Rating: 9/10
Price: US$49.99 (cover price)

Disclaimer: I will receive a free copy of the book as a "thank you" for publishing this review, but nothing more. You can be assured that the review is my honest opinion on the book, not some kind of promotional "independent" review.

A Comprehensive Tour

The title promises 'iText in Action', and the book certainly delivers this. The reader is taken on a comprehensive tour of iText, with many examples demonstrating how to achieve particular outcomes that are very much aligned with the tasks that face real developers in their day-to-day work.

I should warn that this is no easy book. The material it covers is both broad and (in places) complex, so you'll need your thinking cap on as you work through it. But don't let that put you off, because the author is a skilled and knowledgeable guide, and iText is a great library.

The Structure

The book is organised into four major sections:

(1) Introduction.
This provides an history (the why and when) of the iText project, a "Hello World" introduction to using iText, and an overview of Adobe's Portable Document Format (PDF). This sets the context nicely for sections two, three and four. I always enjoy reading the "why and when" of free software projects, so that is for me a particular highlight of section one. The "Hello World" examples are an excellent intro for people that are new to iText, but are also good review material for developers that are already familiar with iText.

(2) Building Blocks.
This section covers the building blocks that provide the core of iText, starting from the low-level text elements, then continuing on with images, and putting it together with the extensive table construction facilities. All of this is covered both with a discussion of the design of the API, and fully worked examples to illustrate the implementation and usage. Anyone that is diligent about working through the examples is going to come out of this section with a good understanding of the core facilities of iText.

(3) Fonts and Graphics.
This section covers fonts and graphics in all their glory and complexity. There is no doubt that fonts are a source of confusion (not just in iText), and the author devotes a lot of space to guiding the reader through the choices (and their consequences) with respect to iText. After the fonts, the author covers the extensive graphics primitives that are available to use, as well as the supremely useful PdfGraphics2D class that provides a really convenient bridge between Java code and PDF (because the Graphics2D API is defined by Java2D, part of the core Java runtime). By the end of this section, the reader will have a good appreciation of the different styles or approaches to using the iText API, as well as the technical knowledge to generate almost any kind of PDF output.

(4) Interactive PDF.
This is an area of iText that I wasn't previously all that familiar with, but after reading this section I came away with a good knowledge of some new (to me) types of problems that could be solved with iText. I might not use this knowledge immediately, but I expect that it could well prove useful in the future. It is a nice way to round off the book, along with the bar code examples provided in the appendix.

The Presentation

Shortly before completing my review of this book, Manning sent me the final edition in PDF format, with the type-setting complete. The book looks great. In particular, an excellent job has been done linking the text to the corresponding source code listings, making it easy to follow along with the numerous examples presented by the author. The book also features a comprehensive index, which is essential for this type of book when you refer back to it from time to time.


This is a really solid book that provides many insights about iText. Newcomers to iText will find that this book gets them up and running quickly, whereas old timers will almost certainly benefit from Bruno's unique insights. I can't find fault with this book. In short, any developer that is making serious use of iText would be a fool not to buy this book.

Comments on this review can be sent to: david dot gilbert at object-refinery dot com.



About the Reviewer

Dave Gilbert is a free software developer who has been writing Java software since 1999. He is the author and maintainer of JFreeChart, a popular chart library for the Java platform, as well as a contributor to the GNU Classpath project.