Chapter 3: Adding content at absolute positions

Chapter 3 of the book iText in Action 2E covers:
  • Low-level access to page content, aka direct content
  • Convenience methods to write direct content
  • Using the ColumnText object
  • Reusing content with the PdfTemplate object
This chapter describes how to write PDF syntax directly to the content stream of the page. It covers the basics, but quickly moves on to convenience methods that hide some of the complexity of PDF. It also discusses the ColumnText object, an object that allows you to add basic building blocks 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.2: Adding text at absolute positions
    • 3.2.1: Convenience method: PdfContentByte.showTextAligned()
    • 3.2.2: Convenience method: ColumnText.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.4: Creating reusable content
    • 3.4.1: Image XObjects
    • 3.4.2: The PdfTemplate object
  • 3.5: Summary
Consult the full table of contents, take a look at the illustrations from this chapter, or try out some of the examples: