IText
Encyclopedia
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.
Typically, iText is used in projects that have one of the following requirements:
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 of 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.
to create 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.
iText is embedded in many products and services, including Eclipse BIRT, Jasper Reports, Red Hat JBoss Seam, Windward Reports
, pdftk
, and others.
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.)
In 2010, the second edition of the book "iText in Action" was released. It was a complete rewrite with new examples.
Free software
Free software, software libre or libre software is software that can be used, studied, and modified without restriction, and which can be copied and redistributed in modified or unmodified form either without restriction, or with restrictions that only ensure that further recipients can also do...
and open source library
Library (computer science)
In computer science, a library is a collection of resources used to develop software. These may include pre-written code and subroutines, classes, values or type specifications....
for creating and manipulating PDF
Portable Document Format
Portable Document Format is an open standard for document exchange. This file format, created by Adobe Systems in 1993, is used for representing documents in a manner independent of application software, hardware, and operating systems....
files in Java
Java (programming language)
Java is a programming language originally developed by James Gosling at Sun Microsystems and released in 1995 as a core component of Sun Microsystems' Java platform. The language derives much of its syntax from C and C++ but has a simpler object model and fewer low-level facilities...
. 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
Affero General Public License
The Affero General Public License, often abbreviated as Affero GPL and AGPL , refers to two distinct, though historically related, free software licenses:...
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
Mozilla Public License
The Mozilla Public License is a free and open source software license. Version 1.0 was developed by Mitchell Baker when she worked as a lawyer at Netscape Communications Corporation and version 1.1 at the Mozilla Foundation...
or the LGPL
GNU Lesser General Public License
The GNU Lesser General Public License or LGPL is a free software license published by the Free Software Foundation . It was designed as a compromise between the strong-copyleft GNU General Public License or GPL and permissive licenses such as the BSD licenses and the MIT License...
. 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
.NET Framework
The .NET Framework is a software framework that runs primarily on Microsoft Windows. It includes a large library and supports several programming languages which allows language interoperability...
under the name iTextSharp. iTextSharp is written in C# and it has a separate codebase, but it is synchronized to iText releases.
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 of advanced PDF features such as PKI
Public key infrastructure
Public Key Infrastructure is a set of hardware, software, people, policies, and procedures needed to create, manage, distribute, use, store, and revoke digital certificates. In cryptography, a PKI is an arrangement that binds public keys with respective user identities by means of a certificate...
-based signatures, 40-bit and 128-bit encryption, color correction, PDF/X, color management
Color management
In digital imaging systems, color management is the controlled conversion between the color representations of various devices, such as image scanners, digital cameras, monitors, TV screens, film printers, computer printers, offset presses, and corresponding media.The primary goal of color...
via ICC
International Color Consortium
The International Color Consortium was formed in 1993 by eight industry vendors in order to create a universal color management system that would function transparently across all operating systems and software packages....
profiles and barcodes.
History
The library was developed by Bruno Lowagie in the winter of 1998 as in-house project at Ghent UniversityGhent University
Ghent University is a Dutch-speaking public university located in Ghent, Belgium. It is one of the larger Flemish universities, consisting of 32,000 students and 7,100 staff members. The current rector is Paul Van Cauwenberge.It was established in 1817 by King William I of the Netherlands...
to create 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
Free and open source software
Free and open-source software or free/libre/open-source software is software that is liberally licensed to grant users the right to use, study, change, and improve its design through the availability of its source code...
(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.
iText is embedded in many products and services, including Eclipse BIRT, Jasper Reports, Red Hat JBoss Seam, Windward Reports
Windward Reports
Windward Reports is a family of enterprise-level reporting, document generation, and business intelligence software for business teams. It is comparable to other reporting software’s such as Crystal Reports, Pentaho and SQL Server Reporting Services. Its customers include GE Industrial Equipment...
, pdftk
Pdftk
pdftk or the pdf toolkit is an open source cross-platform tool for manipulating PDF documents. pdftk is basically a front end to the iText library , capable of splitting, merging, encrypting, decrypting, uncompressing, recompressing, and repairing PDFs...
, and others.
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
Affero General Public License
The Affero General Public License, often abbreviated as Affero GPL and AGPL , refers to two distinct, though historically related, free software licenses:...
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.)
In 2010, the second edition of the book "iText in Action" was released. It was a complete rewrite with new examples.
Example
The following source code generates a PDF file as a Hello World example.Further reading
- PDF Generation Made Easy by Benoy Jose
- Generate PDF files from Java applications dynamically by Amit Tuli, Staff Software Engineer, IBM