IvanWalsh.com – Learn How To Run Your Business Online header image 2

Use iText to create PDF files dynamically

May 31st, 2009 · View Comments · How To

iText lets developers enhance web applications with dynamic PDF document generation and/or manipulation. iText is not an end-user tool. Typically you won’t use it on your Desktop as you would use Acrobat or any other PDF application. Rather, you’ll build iText into your own applications so that you can automate the PDF creation and manipulation process.

 

How to create PDFs Dynamically with iText?

For instance 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.

Key Features of iText

You can use iText to:

  • Serve PDF to a browser
  • Generate dynamic documents from XML files or databases
  • Use PDF’s many interactive features
  • Add bookmarks, page numbers, watermarks, etc.
  • Split, concatenate, and manipulate PDF pages
  • Automate filling out of PDF forms
  • Add digital signatures to a PDF file

iText classes are very useful for web developers who need to generate read-only, platform independent documents containing text, lists, tables and images; or who want to perform specific manipulations on existing PDF documents.

The library is very useful in combination with Java technology-based Servlets; there’s also a .NET port available: iTextSharp (written in C#).

iText requires JDK 1.4. It’s available for free under a multiple license: MPL and LGPL.

Technical Requirements

If you want to use the iText classes you should be acquainted with JAVA (TM) programming.
You’ll also need the following Software:

  • The Java Development Kit (JDK) 1.4
  • The BouncyCastle: bcprov and bcmail
  • Adobe Acrobat Reader from Adobe Systems Incorporated:

Getting started with iText

There are five places that are extremely important if you want to work with iText.

  1. The first is the book page. If you own the book, you get access to hundreds of examples, and you’ll save a lot of time finding your way in the library by using the book as your tutorial.
  2. There’s also a free tutorial that was written before the book. Not all functionality available in iText is explained, but it’s a good place to start. If you click on one of the features in the overview, you get some explanation and some examples on how to use these features.
  3. Some special examples were compiled in the iText Wiki.
  4. If the examples don’t work or you experience some typical newbie problems, please consult the Frequently Asked Questions page.

Related posts:

  1. How to Generate DITA Java API Reference Documentation Any tech writers interested in DITA should read Mariana Alupului’s,...
  2. How to Share Large Files on Twitter with Acrobat.com RJ Jacquez shares this tip for sharing large files on...
  3. How do I create a Screencast.com Account? Screencast.com offers a Free account which includes 2 GB storage...
  4. Create Flash animations in your browser Massachusetts startup DK Pictures has released DoInk, a free online...
  5. How to Create Adobe PDFs Online For Free Want to Convert your documents into Adobe PDF for free?...

Tags: ·

  • Thank you for sharing! For some easy word to pdf. I use googledocs and office 2007. They are free. Here is a step-by-step tutorial: http://www.anypdftools.com/tutorials/save-a-wor...
  • Hello,

    This is a great little tool.

    Do you have any sales material I can look at?

    I review these type of tools on the site. If you have any material, please send it over.

    Here's a question:

    What's the 1 thing you'd want me to SHOUT out if I was reviewing this article?

    The best thing about the product is [ it can do this! ]
blog comments powered by Disqus