Skip to main content
Skip table of contents

Getting Started

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?

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.