iText 7 examples in practice

With iText 7 still hot and new, we are building up our code repository step by step. However, you can get a head-start by downloading our iText 7 Jump-Start Tutorial at no charge, or browse its contents online. If you have a commercial license and a specific question for our development team, please use your JIRA dashboard to do so!


Jump-start tutorial

All code examples from the iText 7 Jump-Start Tutorial: basic building blocks, renderers, low-level content and more.

Building Blocks tutorial

Samples written for the "iText: 7 Building Blocks" tutorial.

Differences with iText 5

iText 5 examples and their iText 7 counterpart.


Many documents present content in the form of tables. PdfPTable is one of the most used objects in iText.

Page events

Page events provide automated code execution when a document is opened or closed, when a page starts or ends, or when a paragraph starts or ends.


Having trouble with fonts? Are you using the right encoding? Type1 fonts, TrueType fonts, OpenType fonts, Latin-1 or Unicode - here is where you'll find the examples you need.


iText supports many types of images: Jpeg, Jpeg2000, Gif, PNG, WMF, JBIG2, CCITT, and so on. But there's more: you can clip images or make them transparent or black and white. You can also draw paths and shapes and fill them with color.


ColumnText is an iText5 object that can be used to add content at absolute positions. Find examples of the same functionality but using iText7 here.

Archiving and accessibility

PDF/A (ISO 19005) and PDF/UA (ISO 14289) are the ISO standards for archiving and universal accessibility and you can see examples here of how to work with them.


There are two types of interactive form in PDF: forms based on AcroForm technology and forms based on XML Forms Architecture (XFA). Discover how to examine, fill out and flatten forms.

Actions and annotations

PDF has many interactive features. It supports JavaScript, internal and external links, and different types of annotations.

Merging PDFs

PDFs can be copied, merged, assembled on a page by page basis.

Manipulating an existing PDF

With iText, you can easily add content such as watermarks, headers, footers to an existing document.

Extraction and redaction

iText can parse the content of a PDF document and extract content from it. This content can also be redacted with iText.


PDFs can be encrypted and digitally signed.


Examples that involve creating and drawing lines and shapes, changing graphics, colors and shapes.


Examples on how to create bar codes, how to introduce logging, and much more.


Convert HTML and CSS to PDF with pdfHTML.