iText

iText®
Developer(s) iText Group NV
Stable release 5.5.3 / July 21, 2014
Written in Java, C#
Operating system Cross-platform
Type Library
License AGPLv3[1]
Proprietary
Website http://itextpdf.com/

iText is an open source library for creating and manipulating PDF files in Java. It was written by Bruno Lowagie, Paulo Soares, and others. Ohloh reports more than 10,000 commits by 26 different contributors since 2001[2] representing more than 1 million lines of code.[3] iText has a well established, mature codebase maintained by a large development team with stable Y-O-Y commits.[4] Using the COCOMO model, it took an estimated 250 man-years of effort starting with its first commit in November, 2000.[5]

As of version 5.0.0 (released Dec 7, 2009) iText is distributed under the Affero General Public License version 3. Previous versions of iText (Java up to 4.2.1 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 iText Group NV.

Two books have been published about iText, written by the original creator of the software. The first edition of "iText in Action" provides an operation overview of iText, complemented with simple examples. The second edition takes readers further with more real-life examples.[6] Some new books are under development. They will be available for free on Leanpub.[7]

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. All examples from the second book were ported to C#,[8] but you can also find an abundance of .Net code samples written by different developers on the Code Project web site.[9] Individual developers such as Chris Haas often write blog posts on specific iTextSharp topics.[10]

By mid 2013 iText (Java) and iTextSharp (.NET) had been downloaded from SourceForge alone over 5 million times. In October 2013 downloads of iText from SourceForge were around 3,000 per week[11] while iTextSharp downloads were around 4,000 per week.[12]

Features

Developers may use iText to:

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 is fast and has a small memory footprint.[13] The iText application has a larger file size but stands out in nearly all other disciplines. The most significant difference is the time consumption, the PDF creation is more than 10 times faster as with the other applications. But also the CPU utilization of the iText application is lower compared to the CPU usage of the competitors.[14]

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

ISO standards support

Watch PDF and Standards, a talk by Adobe's PDF architect Leonard Rosenthol at the iText Summit in 2012.

History

A PDF 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. Leonard Rosenthol, PDF Architect at Adobe, lists iText as one of the early milestones in the history of openness of PDF.[17]

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,500 copies were sold.[18][19] Matt Stephens referred to iText as one of Java's "best-kept secrets".[20]

In 2007, SOA World Magazine listed iText as one of the ten Open Source solutions enterprises should be using.[21] James Gosling praised the iText library, using it in a new edition of Huckster.[22] The New York Times also used iText to create PDF versions of their public domain articles.[23]

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

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.[25]

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

In 2011, iText was featured on Devoxx (The Java community conference) [27]

In 2013, Deloitte nominated the iText Software Group for the Technology Fast 50 Award in the Benelux. The company was ranked 10th in the Benelux and Third in Belgium.[28][29][30][31]

In 2014, iText won the BelCham Entrepreneurship Award in the category "Most Promising Company of the Year" [32] and Deloitte recognized iText Group NV as the fastest growing technology company in Belgium.[33] Subsequently, the company was ranked #28 in Deloitte's Technology Fast 500 in the EMEA region.[34] iText was also featured on the PDF Days in Cologne, Washington DC en New York, on Java One in San Francisco, on Devoxx in Antwerp, and many other events.

Licensing and fork

Versions of iText through 4.1.6/4.2.0 were released under the MPL and LGPL licenses, which allowed them to be used in closed-source software projects. At the end of 2009, with the release of iText 5, the license was switched to the Affero General Public License v3. Projects that do not want to provide their source code may either purchase a commercial license to iText 5 or continue using previous versions of iText under the more liberal license without any changes.[35][36] However, developer Bruno Lowagie has warned[37] that versions prior to 5 may have included code that was not legally licensed under the LGPL, so that closed-source users of previous versions may be liable for copyright infringement. The AGPL license is not compatible with the GPL license, although an AGPL library can be linked to a GPL program.

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);
        }
    }
}

Further reading

See also

References

  1. "The 'LICENSE.txt' file in iText source code repository". Itext.svn.sourceforge.net. Retrieved 2013-10-26.
  2.   (2013-08-19). "Ohloh commits summary". Ohloh.net. Retrieved 2013-10-26.
  3.   (2013-08-19). "Ohloh languages summary". Ohloh.net. Retrieved 2013-10-26.
  4.  . "Ohloh iText overview page". Ohloh.net. Retrieved 2013-10-26.
  5.   (2013-08-19). "Ohloh Estimated development cost". Ohloh.net. Retrieved 2013-10-26.
  6. Book Review by John S. Griffin
  7. "iText books on Leanpub". Leanpub.com. Retrieved 2013-10-26.
  8. "port of the book examples to C#". Kuujinbo.info. Retrieved 2013-10-26.
  9. "iText on the Code Project". Codeproject.com. Retrieved 2013-10-26.
  10. "iTextSharp examples". Cjhaas.com. Retrieved 2013-10-26.
  11. "iText on SourceForge". Sourceforge.net. Retrieved 2013-10-26.
  12. "iTextSharp on SourceForge". Sourceforge.net. Retrieved 2013-10-26.
  13. forum post by Norman Richards, co-author of XDoclet in Action
  14. Creating PDFs on Android — an evaluation by Stefan Fenz
  15. PDF Association (2013-06-06). "How to create PDF/A-3 using iText" (PDF). Pdfa.org. Retrieved 2013-10-26.
  16. iText bringing PDF/UA support to Java Implementations by Duff Johnson
  17. History of PDF Openness by Leonard Rosenthol, Adobe's PDF Architect
  18. "Sales 1st edition". Lowagie.com. Retrieved 2013-10-26.
  19. "How to write an IT bestseller (Dutch article)". Istoire.be. 2012-09-12. Retrieved 2013-10-26.
  20. Stephens, Matt. "Matt Stephens on iText". Adtmag.com. Retrieved 2013-10-26.
  21. "SOA World Magazine". Soa.sys-con.com. Retrieved 2013-10-26.
  22. "James Gosling praises iText". Blogs.oracle.com. 2007-09-20. Retrieved 2013-10-26.
  23. New York Times uses iText
  24. list with references
  25. "Feature article in Wereldwijs, a monthly magazine by Flanders Investment and Trade (in Dutch)". Epub01.publitas.com. Retrieved 2013-10-26.
  26. "Sales 2nd edition". Itextpdf.com. Retrieved 2013-10-26.
  27. iText featured on Devoxx
  28. Ranking Deloitte Technology Fast 50 Benelux
  29. DataNews: 10 Belgians in Deloitte's Technology Fast 50 (Dutch article)
  30. digimedia: the 5 Belgian digital start-ups with the fastest growth rate (Dutch article)
  31. Deloitte's Fast 50 Newspaper article
  32. BelCham Entrepreneurship Awards
  33. Press release Fast 50 by Deloitte
  34. mailing list discussion
  35. Talk about the (A)GPL by Ywein Van den Brande, IP lawyer and technologist
  36. http://stackoverflow.com/questions/8517776/itextsharp-license

External links