
OpenPDF
Free open source Java library for creating and editing PDFs
Replaces Itext 7, Adobe Pdf Services Api, Foxit Pdf Services Api

Who it's for
Use OpenPDF to create reports, invoices, statements, or certificates directly from server-side Java code.
You need a hosted document generation service with templates managed by non-developers.
Use OpenPDF when PDF creation and manipulation should stay in-process and under open source licensing.
Your workload depends on advanced proprietary SDK features that OpenPDF does not cover.
Use OpenPDF for document rendering or encryption workflows in Java applications.
You need a GUI tool for manually editing PDF files.
The problem
PDF generation becomes expensive when a product depends on proprietary SDK licensing or cloud PDF APIs for server-side document workflows. Java teams often need to create invoices, reports, certificates, and exports directly inside their application. A paid PDF API adds data transfer, vendor terms, and recurring cost to a workflow that can often run inside the app process.
How it works
OpenPDF supports creating new PDFs and modifying existing documents, including page changes, text, images, graphics, tables, and layout properties.
OpenPDF HTML, a fork of Flying Saucer, generates PDF files from HTML content.
OpenPDF includes rendering PDFs as images and encrypting documents for security use cases.
OpenPDF is published as `com.github.librepdf:openpdf`, so Java teams can add it through normal dependency management.
Features
- PDF creation and manipulation
- HTML to PDF module
- Rendering and encryption support
- Maven dependency workflow
Recommended for this setup
Strengths
- Runs inside Java applications: OpenPDF lets teams generate and manipulate PDFs in application code instead of sending document data to an external PDF service.
- Dual LGPL/MPL licensing: OpenPDF uses MPL-2.0 or LGPL-2.1+, which gives teams licensing choices that are clearer than proprietary SDK terms.
- Successor to older iText lineage: OpenPDF continues the LGPL/MPL open source iText lineage, which matters for teams replacing older iText-based workflows.
Trade-offs
- Java library, not an end-user editor: OpenPDF is for developers. Users who need a visual PDF editor should use a desktop tool instead.
- License review still matters: LGPL and MPL are more permissive than AGPL for many uses, but teams should review obligations before embedding OpenPDF in commercial software.
Tech stack
FAQ
OpenPDF is an open source Java library for creating, editing, rendering, encrypting, and generating PDF documents.
OpenPDF uses MPL-2.0 or LGPL-2.1+ licensing.
Yes. OpenPDF includes an HTML module for creating PDF files from HTML.