iText in Action, Second Edition
Bruno Lowagie
  • October 2010
  • ISBN 9781935182610
  • 616 pages
  • printed in black & white

Deep coverage of both iText and PDF - indispensable.

Kevin Day, Trumpet, Inc.


An eBook copy of the previous edition, iText in Action (First Edition), is included at no additional cost. It will be automatically added to your Manning Bookshelf within 24 hours of purchase.

iText in Action, Second Edition is an entirely revised new version of the popular first edition. It introduces the latest version of iText, and it lowers the learning curve to its advanced features. Following its innovative, practical examples, you'll master new form types, including AcroForm, explore the XML Forms Architecture (XFA), and discover techniques for linking documents, creating a PDF based on records in a database, and much more.

Written by the creator of iText, this new edition covers the latest version of iText and Java 5. The examples can be easily adapted to .NET using iTextSharp.

Table of Contents detailed table of contents


preface to the first edition


about this book

about the title

about the cover illustration

Part 1 Creating PDF documents from scratch

1. Introducing PDF and iText

1.1. Things you can do with PDF

1.2. Working with the examples in this book

1.3. Creating a PDF document in five steps with iText

1.4. Summary

2. Using iText’s basic building blocks

2.1. Illustrating the examples with a real-world database

2.2. Adding Chunk, Phrase, Paragraph, and List objects

2.3. Adding Anchor, Image, Chapter, and Section objects

3. Adding content at absolute positions

3.1. Introducing the concept of direct content

3.2. Adding text at absolute positions

3.3. Working with the ColumnText object

3.4. Creating reusable content

3.5. Summary

4. Organizing content in tables

4.1. Constructing tables

4.2. Changing the properties of a cell

4.3. Dealing with large tables

4.4. Adding a table at an absolute position

4.5. Summary

5. Table, cell, and page events

5.1. Decorating tables using table and cell events

5.2. Events for basic building blocks

5.3. Overview of the page boundaries

5.4. Adding page events to PdfWriter

5.5. Summary

Part 2 Manipulating existing PDF documents

6. Working with existing PDFs

6.1. Accessing an existing PDF with PdfReader

6.2. Copying pages from existing PDF documents

6.3. Adding content with PdfStamper

6.4. Copying pages with PdfCopy

6.5. Summary

7. Making documents interactive

7.1. Introducing actions

7.2. Adding bookmarks

7.3. Creating annotations

7.4. JavaScript programming in PDF

7.5. Summary

8. Filling out interactive forms

8.1. Introducing AcroForms

8.2. Selecting states or trigger actions with button fields

8.3. Filling in data with text fields

8.4. Selecting options with choice fields

8.5. Refining the form-filling process

8.6. Introducing the XML Forms Architecture (XFA)

8.7. Preserving the usage rights of Reader-enabled forms

8.8. Summary

Part 3 Essential iText skills

9. Integrating iText in your web applications

9.1. Creating a PDF from a servlet

9.2. Making a form “web ready”

9.3. JavaScript communication between HTML and PDF

9.4. Creating basic building blocks from HTML and XML

9.5. Summary

10. Brightening your document with color and images

10.1. Working with the iText color classes

10.2. Overview of supported image types

10.3. Making images transparent

10.4. Summary

11. Choosing the right font

11.1. Getting fonts from a file

11.2. Examining font types from a PDF perspective

11.3. Using fonts in iText

11.4. Automating font creation and selection

11.5. Summary

12. Protecting your PDF

12.1. Adding metadata

12.2. PDF and compression

12.3. Encrypting a PDF document

12.4. Digital signatures, OCSP, and timestamping

12.5. Summary

Part 4 Under the hood

13. PDFs inside-out

13.1. PDF, why and how?

13.3. Exploring the root of a PDF file

13.4. Summary

14. The imaging model

14.1. Examining the content stream

14.2. Path construction and painting operators

14.3. Overview of the graphics state methods

14.4. Overview of the text and text state methods

14.5. Using java.awt.Graphics2D

14.6. Summary

15. Page content and structure

15.1. Making content visible or invisible

15.2. Working with marked content

15.3. Parsing PDFs

15.4. Summary

16. PDF streams

16.1. Finding and replacing image and font streams

16.2. Embedding files into a PDF

16.3. Integrating rich media

16.4. Summary

Appendix A: Bibliography


© 2014 Manning Publications Co.

About the Technology

Search for "Java PDF" and what do you think you'll find in the #1 position? Why, iText, of course. Ever since its launch in 2000, this open source Java library has been the most popular and most broadly used tool for programmatic creation and manipulation of PDF. With it you too can easily transform static PDF into live, interactive applications.

What's inside

  • Automate static and dynamic XFA forms
  • How to generate dynamic PDF from XML or a database
  • How to add digital signatures
  • Covers iText 5

About the author

Bruno Lowagie is the original developer and current maintainer of iText. He works for Ghent University and lives in Ghent, Belgium, with his wife and two sons.

combo $59.99 pBook + eBook
eBook $47.99 pdf + ePub + kindle

FREE domestic shipping on three or more pBooks

The classic, revised with practical code everyone can use.

John S. Griffin,

Masterful, comprehensive.

Saicharan Manga, Services and Solutions

Invaluable examples... what you need is here.

Paulo Soares, Glintt Business Solutions

The canonical source on iText.

Michael Kilnk, AuthentiDate International AG