| Free tutorials for Java, Eclipse and Web programming |
Version 0.5
Copyright © 2008 -2010 Lars Vogel
11.10.2010
| Revision History | ||
|---|---|---|
| Revision 0.1 | 28.06.2009 | Lars Vogel |
| Created | ||
| Revision 0.2 - 0.4 | 30.06.2009 - 11.10.2010 | Lars Vogel |
| bugfixes and enhancements | ||
Table of Contents
iText is a Java library originally created by Bruno Lowagie which allows to create PDF, read PDF and manipulate them. The following tutorial will show how to create PDF files with iText. This tutorial assumes that you have basis Java and Eclipse knowledge.
iText has a hierarchical structure. The smallest text unit is a "Chunk" which is a String with a pre-defined font. A "Phrase" combines several Chunks and allows to define line spacing. "Paragraph" is a subclass of "Phrase" and allows to define more layout attributes, e.g. margins. The class "Anchor" is a subclass of "Paragraph" and serves as the basis for hyperlinks in the generated PDF.