itext /
itext-pdfhtml-java
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.
Loading repository data…
itext / repository
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.
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][itextdotnet] (C#).
Want to discover what's possible? Head over to our Demo Lab! It contains a collection of demo applications ready to use online!
The easiest way to get started is to use Maven, just add the following entries to your pom.xml file:
<properties>
<itext.version>REPLACE_WITH_DESIRED_ITEXT_VERSION</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][building].
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!"));
}
}
}
Starting from version 8.0.3 iText Core supports native image compilation using GraalVM. See [building] for details.
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, |
Selected from shared topics, language and repository description—not editorial ratings.
itext /
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.
| Change font | Java |
| Add form fields | Java |
| General document settings |