What is iText?

iText is a Free/Open Source Software library that can be used for the creation and manipulation of PDF documents ‘on-the-fly’ (meaning from Java Source Code, not using a DeskTop application); iText can be used to:

  • Serve dynamically generated PDF to a web browser.
  • Generate documents and reports based on data from an XML file or a database.
  • Create maps and e-Books, exploiting numerous interactive features available in PDF.
  • Add bookmarks, page numbers, watermarks, and other features to existing PDF documents.
  • Split and/or concatenate pages from existing PDF files.
  • Fill out forms; add digital signatures, and much more besides.

PDF is the file format of choice whenever a document must preserve its structure and layout. Developers looking to enhance web- and other applications with dynamic PDF document generation and/or manipulation can use iText to create/manipulate PDF documents on-the-fly in one or more of the following situations:

  • Due to time or size, the PDF documents can’t be produced manually.
  • The content of the document must be calculated or based on user input.
  • The content needs to be customized or personalized.
  • The PDF content needs to be served in a web environment.
  • Documents are to be created in “batch process” mode.

Why this Wiki?

The most authoritive resource on iText is the book I wrote, but meanwhile new features have been added to the library, and I also have some new examples I want to share with you. The tutorial iText by Example could have been a good place to add this extra information, but I opted for a Wiki because this way other iText users can get involved: if you register, you can add your own examples and your own links to the site. Note that I have some bad experiences with user-generated content on the book support site (the feedback forms are infested with SPAM). That’s why only registered people are allowed to edit pages (and as with itext.ugent.be every user action is monitored).

How to start?

I wrote these examples using the Eclipse Development Platform. You can compile and run the examples in different IDEs or even manually, but then you’ll have to make sure you have all the right jars in your CLASSPATH, also you need to make sure you’re running the JVM with the correct working directory. Otherwise you might not have access to the resources or the database.
Before you start, please read the pages on the environment and the database for more info. All the example code, jars, resources,... can be downloaded from http://itext.ugent.be/wiki/examples/. Basically you can start compiling and executing these examples if you have sufficient knowledge of Java, and if you keep the directory structure intact. (You’ll probably need all the files!)

Examples

These are the examples that are available on this Wiki for the moment:

Filmfestival

The book iText in Action was presented to the public at JavaPolis. As I explain in my interview with Ted Neward I made a completely new set of examples for this presentation, subtitled Dr. iText, or: How I Learned to Stop Worrying and Love PDF. In this presentation, Paulo Soares (the other developer of iText) and I gave a one hour overview of the basic functionality of iText. In this first series of examples, you’ll learn how to reproduce the applications that were shown at JavaPolis.

Portable Collections

In the PDF Reference 1.7 a very interesting new feature is introduced: portable collections. I briefly discuss the possibilities of portable collections, and I demonstrate the functionality using two examples:

The first example is the most valuable if you want to start using portable collections in your own applications; the second example is meant to inspire you ;)

Learning Agreement

I wrote some articles in the past that dealt with forms. For instance: ICT for ECTS about forms that can be used for implementing the European Credit Transfer System, and the Belgian eID and PDF about forms and digital signatures. The examples that come with these articles date from before iText 2.0. Since iText 2.0, a class PdfSmartCopy was introduced. It’s an ideal class if you want to fill out AcroForms (used as a template) in batch with one large PDF (containing all the filled in forms) as a result. This is what’s done in the learningagreement example.

 
Back to top
start.txt · Last modified: 2007/04/13 14:00 by root