iText 5 examples in practice

If you want to get to work on iText libraries, you have come to the right place. It's always a good idea to check back regularly for new examples or browse this section before calling in our support desk.

Categories

Building blocks
iText ships with a series of building blocks that allow you to create a document, e.g. Chunk, Phrase, Paragraph, List.
#CDD7E3
Tables
Many documents present content in the form of tables. PdfPTable is one of the most used objects in iText.
#CDD7E3
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.
#CDD7E3
Fonts
Having trouble with fonts? Maybe you're using the wrong font. Are you sure it knows how to draw the glyphs you need? 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.
#CDD7E3
Images
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.
#CDD7E3
ColumnText
ColumnText is an object that can be used to add content at absolute positions.
#CDD7E3
Forms
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.
#CDD7E3
Actions and annotations
PDF has many interactive features. It supports JavaScript, internal and external links, and different types of annotations.
#CDD7E3
PDF/A and PDF/UA
PDF/A (ISO 19005) and PDF/UA (ISO 14289) are the ISO standards for archiving and universal accessibility.
#CDD7E3
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.
#CDD7E3
Security
PDFs can be encrypted and digitally signed.
#CDD7E3
Graphics
Examples that involve creating and drawing lines and shapes, changing the graphics state, color, graphics2D,...
#CDD7E3
Miscellaneous
Examples on how to create bar codes, how to introduce logging, and much more.
#CDD7E3
ZUGFeRD
ZUGFeRD is a standard for electronic invoices based on the Cross Industry Invoice (CII) standard and PDF/A-3. Read all about it in ‘The Future of Invoicing' and try some of the examples.
#CDD7E3
iText in Action
This book’s second edition was published in 2010 and contains about 300 code samples.
#CDD7E3
Merging existing PDFs
PDFs can be copied, merged, assembled on a page by page basis.
#CDD7E3
Manipulating an existing PDF
With PdfStamper, you can add content such as watermarks, headers, footers to an existing document.
#CDD7E3
XML Worker
iText can convert straightforward XHTML and CSS to PDF with the XML Worker add-on.
#CDD7E3