Skip to content
FossShelf
Home / Categories / For Engineers

OpenPDF

Free open source Java library for creating and editing PDFs

Replaces Itext 7, Adobe Pdf Services Api, Foxit Pdf Services Api

4.40K starsreviewed 5 Jan 2025last commit 14 Nov 2026
Screenshot of OpenPDF

Who it's for

Java teams generating invoices

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.

Products replacing paid PDF SDKs

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.

Developers rendering or encrypting PDFs

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

PDF creation and manipulation

OpenPDF supports creating new PDFs and modifying existing documents, including page changes, text, images, graphics, tables, and layout properties.

HTML to PDF module

OpenPDF HTML, a fork of Flying Saucer, generates PDF files from HTML content.

Rendering and encryption support

OpenPDF includes rendering PDFs as images and encrypting documents for security use cases.

Maven dependency workflow

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

Languages
Java, HTML, Lex, AMPL, Kotlin, CSS, Shell
Frameworks
—
Databases
—
Tooling
—

FAQ

What is OpenPDF?

OpenPDF is an open source Java library for creating, editing, rendering, encrypting, and generating PDF documents.

What license does OpenPDF use?

OpenPDF uses MPL-2.0 or LGPL-2.1+ licensing.

Can OpenPDF generate PDFs from HTML?

Yes. OpenPDF includes an HTML module for creating PDF files from HTML.

Similar tools

More in Engineers