Legacy notice!

iText 5 is the previous major version of iText's leading PDF SDK. iText 5 has been EOL, and is no longer developed. Switch your project to iText 7, integrating the latest developments.
Check related iText 7 content!

The most popular iText example is the "Hello World" example, explaining the five steps to create a PDF from scratch using iText:

// step 1
Document document = new Document();
// step 2
PdfWriter.getInstance(document, new FileOutputStream(filename));
// step 3
// step 4
document.add(new Paragraph("Hello World!"));
// step 5

Obviously, iText is capable of doing much more than creating a PDF that shows the words "Hello World", but let's take a look at some basic questions to get started.

Does anyone have any idea how TabStop works?

How can I generate a PDF/UA compatible PDF with iText?

How to set the page size to Envelope size with Landscape orientation?

How to strike through text using iText?

How to match the size of graphics with the size of a page?

How to align a label versus its content?

How to align two paragraphs to the left and right on the same line?

How to create a custom dashed line separator?

How to add a full line break?

How to create a complex PDF document?

Argument not specified in iTextSharp

How to change the line spacing of text?

How to use the full size of a page?

How to create a document with unequal page sizes?

How to underline text with a dotted line?

How to generate and design PDFs with iText or iTextSharp?