Chapters
-
Introducing PDF and iText
-
Using iText's basic building blocks
-
Adding content at absolute positions
-
Organizing content in tables
-
Table, cell, and page events
-
Working with existing PDFs
-
Making documents interactive
-
Filling out interactive forms
-
Integrating iText in your web applications
-
Brightening up your PDF with color and images
-
Choosing the right font
-
Protecting your PDF
-
PDFs inside-out
-
The imaging model
-
Page content and structure
-
PDF streams
Table of Contents
- Part 1: Creating PDF documents from scratch
- Chapter 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.1: Creating a new Document object
- 1.4.2: Getting a PdfWriter instance
- 1.4.3: Opening the Document
- 1.4.4: Adding content
- 1.4.5: Closing the Document
- 1.4.1: Creating a new Document object
- 1.4: Summary
- 1.1: Things you can do with PDF
- Chapter 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.2.1: The Chunk object: a String, a Font, and some attributes
- 2.2.2: The Phrase object: a List of Chunks with leading
- 2.2.3: The Paragraph object: a Phrase with extra properties and a newline
- 2.2.4: Distributing text over different lines
- 2.2.5: The List object: a sequence of Paragraphs called ListItem
- 2.2.6: The DrawInterface: vertical position marks, separators, and tabs
- 2.2.1: The Chunk object: a String, a Font, and some attributes
- 2.3: Adding Anchor, Image, Chapter, and Section objects
- 2.3.1: The Anchor object: internal and external links
- 2.3.2: Chapter and Section: get bookmarks for free
- 2.3.3: The Image object: adding raster format illustrations
- 2.3.1: The Anchor object: internal and external links
- 2.4: Summary
- 2.1: Illustrating the examples with a real-world database
- Chapter 3: Adding content at absolute positions
- 3.1: Introducing the concept of direct content
- 3.1.1: Direct content layers
- 3.1.2: Graphics state and text state
- 3.1.3: A real-world database: three more tables
- 3.1.1: Direct content layers
- 3.2: Adding text at absolute positions
- 3.2.1: Convenience method: PdfContentByte.showTextAligned()
- 3.2.2: Convenience method: ColumnText.showTextAligned()
- 3.2.1: Convenience method: PdfContentByte.showTextAligned()
- 3.3: Working with the ColumnText object
- 3.3.1: Using ColumnText in text mode
- 3.3.2: Using ColumnText in composite mode
- 3.3.1: Using ColumnText in text mode
- 3.4: Creating reusable content
- 3.4.1: Image XObjects
- 3.4.2: The PdfTemplate object
- 3.4.1: Image XObjects
- 3.5: Summary
- 3.1: Introducing the concept of direct content
- Chapter 4: Organizing content in tables
- 4.1: Constructing tables
- 4.1.1: Your first PdfPTable
- 4.1.2: PdfPTable properties
- 4.1.1: Your first PdfPTable
- 4.2: Changing the properties of a cell
- 4.2.1: PdfPCell in text mode
- 4.2.2: PdfPCell in composite mode
- 4.2.1: PdfPCell in text mode
- 4.3: Dealing with large tables
- 4.3.1: Repeating headers and footers
- 4.3.2: Splitting tables
- 4.3.3: Memory management for LargeElement implementations
- 4.3.1: Repeating headers and footers
- 4.4: Adding a table at an absolute position
- 4.4.1: Working with writeSelectedRows()
- 4.4.2: Wrapping tables in columns
- 4.4.1: Working with writeSelectedRows()
- 4.5: Summary
- 4.1: Constructing tables
- Chapter 5: Table, cell, and page events
- 5.1: Decorating tables using table and cell events
- 5.1.1: Implementing the PdfPTableEvent interface
- 5.1.2: Implementing the PdfPCellEvent interface
- 5.1.3: Combining table and cell events
- 5.1.1: Implementing the PdfPTableEvent interface
- 5.2: Events for basic building blocks
- 5.2.1: Generic Chunk functionality
- 5.2.2: Paragraph events
- 5.2.3: Chapter and Section events
- 5.2.4: Page order and blank pages
- 5.2.1: Generic Chunk functionality
- 5.3: Overview of the page boundaries
- 5.3.1: The media box
- 5.3.2: The crop box
- 5.3.3: Other page boundaries
- 5.3.1: The media box
- 5.4: Adding page events to PdfWriter
- 5.4.1: Adding a header and a footer
- 5.4.2: Solving the "page X of Y" problem
- 5.4.3: Adding a watermark
- 5.4.4: Creating a slide show
- 5.4.1: Adding a header and a footer
- 5.5: Summary
- 5.1: Decorating tables using table and cell events
- Chapter 1: Introducing PDF and iText
- Part 2: Manipulating existing PDF documents
- Chapter 6: Working with existing PDFs
- 6.1: Accessing an existing PDF with PdfReader
- 6.1.1: Retrieving information about the document and its pages
- 6.1.2: Reducing the memory use of PdfReader
- 6.1.1: Retrieving information about the document and its pages
- 6.2: Copying pages from existing PDF documents
- 6.2.1: Importing pages
- 6.2.2: Scaling and superimposing pages
- 6.2.3: N-up copying and tiling PDF documents
- 6.2.1: Importing pages
- 6.3: Adding content with PdfStamper
- 6.3.1: Adding content at absolute positions
- 6.3.2: Creating a PDF in multiple passes
- 6.3.3: Adding company stationery to an existing document
- 6.3.4: Inserting pages into an existing document
- 6.3.5: Filling out a PDF form
- 6.3.1: Adding content at absolute positions
- 6.4: Copying pages with PdfCopy
- 6.4.1: Concatenating and splitting PDF documents
- 6.4.2: PdfCopy versus PdfSmartCopy
- 6.4.3: Concatenating forms
- 6.4.1: Concatenating and splitting PDF documents
- 6.5: Summary
- 6.1: Accessing an existing PDF with PdfReader
- Chapter 7: Making documents interactive
- 7.1: Introducing actions
- 7.1.1: Document-navigation actions
- 7.1.2: Explicit destinations
- 7.1.3: JavaScript in PDF documents
- 7.1.4: More actions
- 7.1.1: Document-navigation actions
- 7.2: Adding bookmarks
- 7.2.1: Creating bookmarks for a new document
- 7.2.2: Retrieving bookmarks from an existing document
- 7.2.3: Adding bookmarks to an existing document
- 7.2.4: Concatenating documents with bookmarks
- 7.2.5: Open parameters
- 7.2.1: Creating bookmarks for a new document
- 7.3: Creating annotations
- 7.3.1: Text annotations
- 7.3.2: Link annotations
- 7.3.3: File attachments
- 7.3.4: Stamp, line and rectangle annotations
- 7.3.1: Text annotations
- 7.4: JavaScript programming in PDF
- 7.4.1: Triggering JavaScript from a button
- 7.4.2: Showing and hiding an annotation
- 7.4.3: A popup triggered by a button that doesn't need to be pushed
- 7.4.4: Additional actions
- 7.4.5: A PDF calculator
- 7.4.1: Triggering JavaScript from a button
- 7.5: Summary
- 7.1: Introducing actions
- Chapter 8: Filling out interactive forms
- 8.1: Introducing AcroForms
- 8.2: Selecting states or trigger actions with button fields
- 8.2.1: Radio fields and radio buttons
- 8.2.2: Check boxes
- 8.2.3: Pushbuttons
- 8.2.1: Radio fields and radio buttons
- 8.3: Filling in data with text fields
- 8.3.1: Creating text fields
- 8.3.2: Filling out text fields
- 8.3.3: Text fields and fonts
- 8.3.4: Validating text fields
- 8.3.1: Creating text fields
- 8.4: Selecting options with choice fields
- 8.4.1: Creating lists and combo boxes
- 8.4.2: Manipulating lists and combo boxes
- 8.4.1: Creating lists and combo boxes
- 8.5: Refining the form filling process
- 8.5.1: Choosing field names
- 8.5.2: Optimizing the filling process
- 8.5.3: Partial form flattening
- 8.5.4: Customized form flattening
- 8.5.1: Choosing field names
- 8.6: Introducing the XML Forms Architecture (XFA)
- 8.6.1: Static XFA forms
- 8.6.2: Dynamic XFA forms
- 8.6.1: Static XFA forms
- 8.7: Preserving the usage rights of reader enabled forms
- 8.7.1: Reader enabling a form using Adobe Acrobat
- 8.7.2: Filling out Reader enabled forms using iText
- 8.7.1: Reader enabling a form using Adobe Acrobat
- 8.8: Summary
- 8.1: Introducing AcroForms
- Chapter 6: Working with existing PDFs
- Part 3: Essential iText Skills
- Chapter 9: Integrating iText in your web applications
- 9.1: Creating PDF from a Servlet
- 9.1.1: The five steps of PDF creation in a web application
- 9.1.2: Troubleshooting web applications
- 9.1.3: Generating PDF from a JSP page
- 9.1.1: The five steps of PDF creation in a web application
- 9.2: Making a form "web ready"
- 9.2.1: Adding a submit button to an existing form
- 9.2.2: Filling out a form on the server side
- 9.2.3: FDF and XFDF in web applications
- 9.2.1: Adding a submit button to an existing form
- 9.3: JavaScript communication between HTML and PDF
- 9.4: Creating basic building blocks from HTML and XML
- 9.4.1: Parsing HTML
- 9.4.2: Parsing XML
- 9.4.1: Parsing HTML
- 9.5: Summary
- 9.1: Creating PDF from a Servlet
- Chapter 10: Brightening up your PDF with color and images
- 10.1: Working with the iText color classes
- 10.1.1: Device colors
- 10.1.2: Spot colors
- 10.1.3: Painting patterns
- 10.1.4: Transparency
- 10.1.1: Device colors
- 10.2: Overview of supported image types
- 10.2.1: JPEG, JPEG2000, GIF, PNG, BMP, WMF, TIFF, and JBIG2
- 10.2.2: Creating a raw image
- 10.2.3: CCITT compressed images
- 10.2.4: Creating barcodes
- 10.2.5: Working with java.awt.Image
- 10.2.6: Compressing images
- 10.2.7: Images consisting of multiple pages or frames
- 10.2.1: JPEG, JPEG2000, GIF, PNG, BMP, WMF, TIFF, and JBIG2
- 10.3: Making images transparent
- 10.3.1: Images and transparency
- 10.3.2: Masking images
- 10.3.3: Clipping images
- 10.3.1: Images and transparency
- 10.4: Summary
- 10.1: Working with the iText color classes
- Chapter 11: Choosing the right font
- 11.1: Getting fonts from a file
- 11.1.1: Font files and their extensions
- 11.1.2: Type 1 fonts
- 11.1.3: True Type and Open Type fonts
- 11.1.1: Font files and their extensions
- 11.2: Examining font types from a PDF perspective
- 11.2.1: Simple fonts
- 11.2.2: Composite fonts
- 11.2.1: Simple fonts
- 11.3: Using fonts in iText
- 11.3.1: Overview of the Font classes
- 11.3.2: Type 3 fonts
- 11.3.3: CJK Fonts
- 11.3.4: Writing from right to left
- 11.3.5: Advanced typography
- 11.3.1: Overview of the Font classes
- 11.4: Automating font creation and selection
- 11.4.1: Getting a Font from the FontFactory
- 11.4.2: Automatic font selection
- 11.4.1: Getting a Font from the FontFactory
- 11.5: Summary
- 11.1: Getting fonts from a file
- Chapter 12: Protecting your PDF
- 12.1: Adding metadata
- 12.1.1: The Info dictionary
- 12.1.2: The Extensible Metadata Platform (XMP)
- 12.1.1: The Info dictionary
- 12.2: PDF and compression
- 12.2.1: Compression levels
- 12.2.2: Compressing and decompressing existing files
- 12.2.1: Compression levels
- 12.3: Encrypting a PDF document
- 12.3.1: Creating a password-encrypted PDF
- 12.3.2: Public-key encryption
- 12.3.1: Creating a password-encrypted PDF
- 12.4: Digital signatures, OCSP, and timestamping
- 12.4.1: Creating an unsigned signature field
- 12.4.2: Signing a PDF
- 12.4.3: Adding multiple signatures
- 12.4.4: Verifying the signatures in a document
- 12.4.5: Creating the digest and signing externally
- 12.4.6: CRLs, OCSP, and timestamping
- 12.4.7: PDF Advanced Electronic Signature (PAdES) profiles
- 12.4.1: Creating an unsigned signature field
- 12.5: Summary
- 12.1: Adding metadata
- Chapter 9: Integrating iText in your web applications
- Part 4: Under the hood
- Chapter 13: PDFs inside-out
- 13.1: PDF, why and how?
- 13.1.1: The ancestors of PDF
- 13.1.2: The history of PDF
- 13.1.3: PDF as an ISO standard
- 13.1.4: PDF/X, PDF/A, PDF/E, PDF/UA, and other types of PDF
- 13.1.1: The ancestors of PDF
- 13.2: Understanding the Carousel Object System
- 13.2.1: Basic PDF objects
- 13.2.2: The PDF file structure
- 13.2.3: Climbing up the object tree
- 13.2.1: Basic PDF objects
- 13.3: Exploring the root of a PDF file
- 13.3.1: Page layout, page mode, and viewer preferences
- 13.3.2: Pages and page labels
- 13.3.3: Outlines, destinations, and names
- 13.3.4: Acroforms revisited
- 13.3.1: Page layout, page mode, and viewer preferences
- 13.4: Summary
- 13.1: PDF, why and how?
- Chapter 14: The imaging model
- 14.1: Examining the content stream
- 14.2: Path construction and painting operators
- 14.2.1: Constructing paths
- 14.2.2: Painting and clipping paths
- 14.2.3: Convenience methods to draw shapes
- 14.2.1: Constructing paths
- 14.3: Overview of the graphics state methods
- 14.3.1: Line characteristics
- 14.3.2: Colors
- 14.3.3: Changing the coordinate system
- 14.3.4: Affine transformations using Java
- 14.3.1: Line characteristics
- 14.4: Overview of the text and text state methods
- 14.4.1: Text state operators
- 14.4.2: Text-positioning and text-showing operators
- 14.4.3: Convenience methods for text
- 14.4.1: Text state operators
- 14.5: Using java.awt.Graphics2D
- 14.5.1: Drawing content to PdfGraphics2D
- 14.5.2: Drawing text to PdfGraphics2D
- 14.5.1: Drawing content to PdfGraphics2D
- 14.6: Summary
- 14.1: Examining the content stream
- Chapter 15: Page content and structure
- 15.1: Making content visible or invisible
- 15.1.1: Optional content groups
- 15.1.2: Adding structure to layers
- 15.1.3: Optional content membership
- 15.1.4: Changing the state of a layer with an action
- 15.1.5: Optional content in XObjects and annotations
- 15.1.1: Optional content groups
- 15.2: Working with marked content
- 15.2.1: Object data
- 15.2.2: Section 508 and accessibility
- 15.2.3: Adding structure
- 15.2.1: Object data
- 15.3: Parsing PDF
- 15.3.1: Examining the content stream with PRTokeniser
- 15.3.2: Processing content streams with the PdfContentStreamProcessor
- 15.3.3: Extracting text with PdfReaderContentParser and PdfTextExtractor
- 15.3.4: Finding text margins
- 15.3.5: Extracting images
- 15.3.1: Examining the content stream with PRTokeniser
- 15.4: Summary
- 15.1: Making content visible or invisible
- Chapter 16: PDF streams
- 16.1: Finding and replacing image and font streams
- 16.1.1: Adding a special ID to an Image
- 16.1.2: Resizing an image in an existing document
- 16.1.3: Listing the fonts used
- 16.1.4: Replacing a font
- 16.1.1: Adding a special ID to an Image
- 16.2: Embedding files into a PDF
- 16.2.1: File attachment annotations
- 16.2.2: Document-level attachments
- 16.2.3: Go to embedded file action
- 16.2.4: PDF packages, portable collections, or portfolios
- 16.2.1: File attachment annotations
- 16.3: Integrating rich media
- 16.3.1: Movie annotations
- 16.3.2: 3D annotations
- 16.3.3: Embedding Flash into a PDF
- 16.3.4: Establishing communication between Flex and PDF
- 16.3.1: Movie annotations
- 16.4: Summary
- 16.1: Finding and replacing image and font streams
- Chapter 13: PDFs inside-out
- Appendix:
From the back cover
- "Deep coverage of both iText and PDFindispensable" Kevin Day, Trumpet Inc.
- "The classic, revised with practical code everyone can use." John S. Griffin, overstock.com
- "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 Klink, AuthentiDate International
Buy it!
Content © 2010-2012 1T3XT BVBA

