iText

From Wikipedia, the free encyclopedia
  (Redirected from Itext)
Jump to: navigation, search
iText®
Itextlogo.gif
Developer(s) 1T3XT BVBA
Stable release 5.1.3 / November 11, 2011; 3 months ago (2011-11-11)
Written in Java, C#
Operating system Cross-platform
Type Library
License AGPLv3[1]
Proprietary
Website http://itextpdf.com/

iText is a free and open source library for creating and manipulating PDF files in Java. It was written by Bruno Lowagie, Paulo Soares, and others. As of version 5.0.0 (released Dec 7, 2009) it is distributed under the Affero General Public License version 3. Previous versions of iText (Java up to 2.1.7 and C# up to 4.1.6) were distributed under the Mozilla Public License or the LGPL. iText is also available through a proprietary license, distributed by iText Software Corp. iText® is a registered trademark by 1T3XT BVBA.

iText has been ported to the .NET Framework under the name iTextSharp. iTextSharp is written in C# and it has a separate codebase, but it is synchronized to iText releases.[2]

Contents

[edit] Features

Developers will use iText to:

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

Typically, iText is used in projects that have one of the following requirements:

  • The content isn't available in advance: it's calculated based on user input or real-time database information.
  • The PDF files can't be produced manually due to the massive volume of content: a large number of pages or documents.
  • Documents need to be created in unattended mode, in a batch process.
  • The content needs to be customized or personalized; for instance, the name of the end user has to be stamped on a number of pages.

Often you'll encounter these requirements in web applications, where content needs to be served dynamically to a browser. Normally you'd serve this information in the form of HTML, but for some documents, PDF is preferred over HTML for better printing quality, for identical representation on a variety of platforms, for security reasons, or to reduce the file size.

iText provides support for most advanced PDF features such as PKI-based signatures, 40-bit and 128-bit encryption, color correction, PDF/X, color management via ICC profiles and barcodes.

[edit] History

The library was developed by Bruno Lowagie in the winter of 1998 as in-house project at Ghent University to create a PDF documents application for the student administration. The library (formerly known as rugPdf) was a very small and complex library with minimum functionality, such as simply reading and writing PDF files. The developer had to be knowledgeable of PDF syntax, objects, operators and operands to work with the library.

In 1999, Lowagie threw away the rugPdf code and wrote a new library, iText, from scratch. Lowagie created iText as a library that Java developers can use to create PDF documents without knowing PDF syntax, and released it as a Free and Open Source Software (FOSS) product on February 14, 2000. In the summer of 2000, Paulo Soares joined the project and is now one of the main developers of new iText features.

In 2006, a first book was published "iText in Action, Creating and Manipulating PDF", of which more than 11,000 copies were sold. [3]

iText is embedded in many products and services, including Eclipse BIRT, Jasper Reports, Red Hat JBoss Seam, Windward Reports, pdftk, and others.[4]

In late 2008, iText became available for proprietary license; and in early 2009 iText Software Corp. was formed to be the worldwide licensor of iText products.

In the end of 2009, iText version 5 is released under Affero GPL license. This license is drastically different from the previous license that iText had been distributed under, in that it requires anyone using iText 5 under a free license to provide the users with the full source of their application. Projects that do not want to provide their source code are required to purchase a commercial license for a non-disclosed price or they cannot upgrade to iText 5. (Projects can continue using previous versions of iText under the more liberal license without any changes.) [5]

In 2010, the second edition of the book "iText in Action" was released. It was a complete rewrite with new examples.

[edit] Example

The following source code generates a PDF file as a Hello World example.

import java.io.FileOutputStream;
import com.itextpdf.text.Document;
import com.itextpdf.text.Paragraph;
import com.itextpdf.text.pdf.PdfWriter;
 
public class ITextHelloWorld {
   public static void main(String args[]) {
       try {
          Document document = new Document();
          PdfWriter.getInstance(document, new FileOutputStream("HelloWorld.pdf"));
          document.open();
          document.add(new Paragraph("Hello World"));
          document.close();
       } catch (Exception e) {
          System.out.println(e);
       }
   }
}

[edit] Further reading

[edit] See also

[edit] References

[edit] External links

Personal tools
Namespaces

Variants
Actions
Navigation
Interaction
Toolbox
Print/export
Languages