• Stars
    star
    1,762
  • Rank 25,406 (Top 0.6 %)
  • Language
    Java
  • License
    Other
  • Created about 8 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

iText for Java represents the next level of SDKs for developers that want to take advantage of the benefits PDF can bring. Equipped with a better document engine, high and low-level programming capabilities and the ability to create, edit and enhance PDF documents, iText can be a boon to nearly every workflow.

Logo iText

Maven Central AGPL License GitHub all releases GitHub commit activity (branch)

iText Core/Community is a high-performance, battle-tested library that allows you to create, adapt, inspect and maintain PDF documents, allowing you to add PDF functionality to your software projects with ease. It is also available for .NET (C#).

The key features of iText Core/Community are:

  • Core library:
    • PDF creation with the use of our layout engine
    • PDF manipulation, e.g. merging multiple PDFs into one, adding new content, ...
    • PDF digital signing
    • PDF form creation and manipulation
    • Working with PDF/A documents
    • Working with PDF/UA documents
    • FIPS-compliant cryptography
    • Barcode generation
    • SVG support
  • Addons:
    • Converting XML/HTML & CSS to PDF repo, info
    • Redacting sensitive information in PDF documents repo, info
    • Support for international character sets (e.g. Arabic, Chinese, Hebrew, Thai, ...) info
    • Optimize PDF documents for reduced file size, and increased performance info
    • Flattening XFA documents info
    • PDF debugging repo, info

Want to discover what's possible? Head over to our Demo Lab! It contains a collection of demo applications ready to use online!

Getting started

The easiest way to get started is to use Maven, just add the following entries to your pom.xml file:

<properties>
  <itext.version>8.0.2</itext.version>
</properties>
<dependencies>
  <dependency>
    <groupId>com.itextpdf</groupId>
    <artifactId>itext-core</artifactId>
    <version>${itext.version}</version>
    <type>pom</type>
  </dependency>
  <dependency>
    <groupId>com.itextpdf</groupId>
    <artifactId>bouncy-castle-adapter</artifactId>
    <version>${itext.version}</version>
  </dependency>
</dependencies>

For more advanced use cases, please refer to the Installation guidelines. You can also build iText Community from source.

Hello PDF!

The following example shows how easy it is to create a simple PDF document:

package com.itextpdf.hellopdf;

import com.itextpdf.kernel.pdf.PdfDocument;
import com.itextpdf.kernel.pdf.PdfWriter;
import com.itextpdf.layout.Document;
import com.itextpdf.layout.element.Paragraph;

import java.io.FileNotFoundException;

public class HelloPdfApp {

    public static void main(String[] args) throws FileNotFoundException {
      try (Document document = new Document(new PdfDocument(new PdfWriter("./hello-pdf.pdf")))) {
            document.add(new Paragraph("Hello PDF!"));
        }
    }
}

Examples

This is a small subset of examples to get you started. For more advanced examples, refer to our Knowledge Base or the following links: Examples repo, Signing examples.

Some of the output PDF files will be incorrectly displayed by the GitHub previewer, so be sure to download them to see the correct results.

Description Link
Basic layout
Change text properties Java, PDF
Creating a simple table Java, PDF
Add an image to a PDF document Java, PDF
Create a list Java, PDF
Add a watermark Java, PDF
Add links to navigate within a document Java, PDF
Create a popup annotation Java, PDF
Change font Java
Add form fields Java

General document settings
Change page size and margin Java, PDF
Write PDF to byte array instead of to disk Java
Change page rotation Java, PDF
Add header and footer Java, PDF
Merge documents Java, PDF
Flatten annotations Java

PDF/UA, PDF/A
Create PDF/UA document Java, PDF
Create PDF/A-3 document Java

FIPS
Enable FIPS Java
FIPS SHA3 example Java

Convert HTML and CSS to PDF Link to repo
Convert simple HTML doc to PDF Java

Secure redaction of content Link to repo
Redacting content Java
Redact based on regex Java

Support complex writing systems Link to docs
Add Arabic text Java, PDF

Optimizing PDFs Link to docs
Reduce size of PDF Java

XFA flattening Link to docs
Flatten an XFA document Java

RUPS Link to repo
Debug a PDF Java

FAQs, tutorials, etc.

Check out the iText Knowledge Base for the iText Jump-start tutorial and other tutorials, FAQs and more. For specific information and examples relating to digital signatures and iText, make sure to check the Digital Signatures Hub.

Many common questions have already been answered on Stack Overflow, so make sure to also check there.

Contributing

Many people have contributed to iText Core/Community over the years. If you've found a bug, a mistake in documentation, or have a hot new feature you want to implement, we welcome your contributions.

Small changes or fixes can be submitted as a Pull Request, while for major changes we request you contact us at [email protected] so we can better coordinate our efforts and prevent duplication of work.

Please read our Contribution Guidelines for details on code submissions, coding rules, and more.

Licensing

iText is dual licensed as AGPL/Commercial software.

AGPL is a free/open-source software license, however, this doesn't mean the software is gratis!

The AGPL is a copyleft license, which means that any derivative work must also be licensed under the same terms. If you’re using iText in software or a service which cannot comply with the AGPL terms, we have a commercial license available that exempts you from such obligations.

Contact Sales for more info.

More Repositories

1

itextpdf

[DEPRECATED] Core Java Library + PDF/A, xtra and XML Worker. Only security fixes will be added — please use iText 7
Java
1,549
star
2

itext7-dotnet

iText for .NET is the .NET version of the iText library, formerly known as iTextSharp, which it replaces. iText represents the next level of SDKs for developers that want to take advantage of the benefits PDF can bring. Equipped with a better document engine, high and low-level programming capabilities and the ability to create, edit and enha
C#
1,482
star
3

itextsharp

[DEPRECATED] .NET port of the iText library, only security fixes will be added — please use iText for .NET
C#
1,327
star
4

i7j-rups

RUPS is an acronym for Reading and Updating PDF Syntax. RUPS is a tool built on top of iText® that allows you to look inside a PDF document and browse the different PDF objects and content streams.
Java
243
star
5

i7j-pdfhtml

pdfHTML is an iText add-on for Java that allows you to easily convert HTML and CSS into standards compliant PDFs that are accessible, searchable and usable for indexing.
HTML
202
star
6

i7n-pdfhtml

pdfHTML is an iText add-on for C# (.NET) that allows you to easily convert HTML and CSS into standards compliant PDFs that are accessible, searchable and usable for indexing.
HTML
151
star
7

rups

[DEPRECATED - please use i7j-rups instead] RUPS is an abbreviation for Reading and Updating PDF Syntax. RUPS is a tool built on top of iText® that allows you to look inside a PDF document and browse the different PDF objects and content streams.
Java
107
star
8

itext-publications-examples-java

Java
98
star
9

itext-android-ui

Kotlin
45
star
10

itext-publications-samples-dotnet

This repository contains the .NET samples produced for various iText functionality.
C#
42
star
11

i7j-pdfsweep

Remove content from your digital documents irretrievably instead of just covering it up. Redact text, images, parts of images or drawings for complete confidentiality. iText pdfSweep complies with GDPR for data redaction.
Java
35
star
12

i5js-sandbox

[DEPRECATED] iText 5 has been deprecated, and only security fixes will be added — please use iText 7
HTML
34
star
13

i7n-pdfocr

pdfOCR is an iText 7 add-on to recognize and extract text in scanned documents and images. It can also convert them into fully ISO-compliant PDF or PDF/A-3u files that are accessible, searchable, and suitable for archiving
C#
33
star
14

itext-publications-signatures-java

Java
29
star
15

i7j-pdfocr

pdfOCR is an iText 7 add-on to recognize and extract text in scanned documents and images. It can also convert them into fully ISO-compliant PDF or PDF/A-3u files that are accessible, searchable, and suitable for archiving
Java
28
star
16

i7n-pdfsweep

Remove content from your digital documents irretrievably instead of just covering it up. Redact text, images, parts of images or drawings for complete confidentiality. iText pdfSweep complies with GDPR for data redaction.
C#
28
star
17

itext-publications-book-java

Java
23
star
18

i5js-tutorial

[DEPRECATED] iText 5 has been deprecated, and only security fixes will be added — please use iText 7
Java
19
star
19

itext-publications-jumpstart-java

This repository contains the code used on the eBook - "iText 7: Jump-Start Tutorial for Java"
Java
18
star
20

pdfchain

pdfChain: (experimental) blockchain for the masses
Java
17
star
21

i5js-book

[DEPRECATED] iText 5 has been deprecated, and only security fixes will be added — please use iText 7
Java
16
star
22

pdfcop

An interpretation of the content stream structure as described by ISO 32000
Java
11
star
23

itext-publications-highlevel-java

Java
11
star
24

i7n-pdfinvoice

pdfInvoice is an example implementation in iText 7 for the German ZUGFeRD 1.0 digital invoice standard.
C#
7
star
25

pdfdeserializer

A tool that deserializes String representations of PDF Objects into Java/iText objects
Java
6
star
26

i7j-pdfinvoice

pdfInvoice is an example implementation in iText 7 for the German ZUGFeRD 1.0 digital invoice standard.
Java
6
star
27

pdfdebug-intellij

pdfDebug is a unique PDF debugger that integrates into your IDE and allows you to debug your code while your are writing it.
Java
6
star
28

i7js-zugferd

Java
5
star
29

itext-publications-signing-examples-java

Java
5
star
30

i5ns-book

[DEPRECATED] iText 5/iTextSharp has been deprecated, and only security fixes will be added — please use iText 7
C#
5
star
31

pdfdebug-eclipse

pdfDebug is a unique PDF debugger that integrates into your IDE and allows you to debug your code while your are writing it.
Java
5
star
32

pdfdebug-netbeans

pdfDebug is a unique PDF debugger that integrates into your IDE and allows you to debug your code while your are writing it.
Java
5
star
33

i5ns-tutorial

[DEPRECATED] iText 5/iTextSharp has been deprecated, and only security fixes will be added — please use iText 7
C#
4
star
34

certomancer-as-a-service

PKI testing container with Java integration.
Java
3
star
35

xfdf-merger

XFDF annotation merging tool
Java
3
star
36

itext-2022-customer-event

Java
1
star