Chapter 4. Organizing content in tables

This chapter covers

  • Constructing a PdfPTable object
  • Exploring the properties of a PdfPCell object
  • Adding tables to the Document object

iText has existed for more than ten years now. If you were to ask me which objects have been the most important in the iText-related projects I’ve done in all those years, I wouldn’t have to think twice about the answer. Most of my assignments have consisted of creating reports that render the content of a database to a PDF document. This content had to be organized in tabular form. This can be achieved using two classes that are important enough to be the focus of an entire chapter: PdfPTable and PdfPCell.

We’ll start with simple examples, then move on to more complex ...

Get iText in Action now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.