iText 7 Community

iText 7 Community is the same as iText 7 Core in terms of functionalities, but can be used only with the AGPL license. Compliance with this license typically means you must disclose your own source code under an AGPL compatible license and you must disclose any modifications to iText. In addition, not all iText 7 add-ons are available for the Community version, and it does not come with premium support.

Features & Benefits

Click the arrow to expand features and benefits.

Getting started with iText 7

Core capabilities and why upgrade

iText 7 was built on nearly a decade of lessons learned from iText 5 development. It is a simpler, more performant and extensible library that is ready to handle the increased challenges of today's document workflows, one add-on at a time.

Modular structure and intuitive APIs

  • Future extensibility.
  • Gentle learning curve with extensive documentation and examples.

Up to date with the latest standards and best practices

  • Unicode for bookmarks, PDF names, PDF strings, passwords, etc.
  • Up to date hashing and encryption algorithms for digital signatures and document security.
  • Support for multi-gigabyte files and documents with thousands of pages.

Customizable and extensible

  • Comprehensive out of the box functionality, with the flexibility to extend and customize.
  • Focus on easy integration and open standards.

Possible to extend functionalities with the iText 7 add-ons

iText 7 Community

Examples of iText 7 Community

1. Creating

Simple PDF creation with some text and an image:

        PdfWriter writer = new PdfWriter("output.pdf");
        PdfDocument pdf = new PdfDocument(writer);
        Document document = new Document(pdf);
        Image itext = new Image(ImageDataFactory.create("itext.png")).setWidth(75);
        document.add(new Paragraph().add("Your developer journey with ").add(itext).add(" begins here..."));

Output result Hello World example

2. Updating

Manipulation of an existing PDF document, for example adding a watermark:

        PdfDocument pdf = new PdfDocument(new PdfReader("input.pdf"), new PdfWriter("output.pdf"));
        PdfPage firstPage = pdf.getFirstPage();
        PdfCanvas under = new PdfCanvas(firstPage.newContentStreamBefore(), new PdfResources(), pdf);
        Paragraph p = new Paragraph("~~WATERMARK~~").setFontSize(72).setFontColor(Color.RED).setBold();
        float x = firstPage.getPageSize().getWidth() / 2;
        float y = firstPage.getPageSize().getHeight() / 2;
        new Canvas(under, pdf, pdf.getDefaultPageSize())
            .showTextAligned(p, x, y, 1, TextAlignment.CENTER, VerticalAlignment.MIDDLE, (float) (Math.PI / 4));

Updating result Watermark example

3. Parsing

Parsing existing PDF documents, for example to extract the text content from them. Using the input PDF displayed above:

        PdfDocument pdf = new PdfDocument(new PdfReader("input.pdf"));
        String text = PdfTextExtractor.getTextFromPage(pdf.getPage(1), new LocationTextExtractionStrategy());
        System.out.println("Extracted text:");

Extracted text: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus vulputate tristique ipsum, nec congue tellus pharetra faucibus. Curabitur nec risus eget eros sodales eleifend id et sapien. Praesent placerat justo eu felis tincidunt mattis. Nam porttitor, nisi vel vestibulum interdum, diam metus commodo nunc, eu porta dolor nisl faucibus ipsum. Integer sit amet sem condimentum, rutrum enim ac, interdum est. Nunc sagittis, nunc sed porta condimentum, ipsum ex euismod massa, eget lacinia lorem ante quis nunc. Donec ut risus congue, sollicitudin mi vitae, ullamcorper mauris. Nullam efficitur maximus turpis, sed congue ex volutpat et. Nam mi mauris, consequat eget lorem non, vehicula rhoncus sapien. Nam et nunc et leo varius [...]

Discover our resources


Community Support