Chapter 5. Table, cell, and page events
This chapter covers
- Cell and table events
- Events for Chunks, Paragraphs, Chapters, and Sections
- Page boundaries
- Adding headers, footers, and watermarks using page events
In chapters 2 and 4, you added content to a document using a plethora of objects and methods available in iText. When adding a Chunk, you were able to use methods to add lines and a background color. When creating a PdfPTable, you could define borders and backgrounds. But what if all of this isn’t sufficient? What if you don’t want a rectangular background for a Chunk, but a custom shape instead, such as an ellipse? What if you want the borders of a PdfPCell to have rounded corners? This chapter explains how to write custom functionality ...