OSI-licensed open source

Best Open-Source PDF Tools and Generators (2026)

Open-source PDF tools cover generating, merging, splitting, rendering, editing and securing PDF files without per-document SaaS fees. Developers usually need either a library for their language or a self-hosted service they can call over HTTP.

This page lists nine maintained projects, grouped by what they do best: a self-hosted editor (Stirling-PDF), a viewer (PDF.js), libraries for Java, Python, JavaScript and Go, an HTML-to-PDF API (Gotenberg) and a command-line transformer (QPDF). Licences were read from each repository.

Tools, licences and pricing checked against vendor and repository pages on November 7, 2026.

What to look for

  • •Language and runtime fit: Java, Python, JavaScript, Go or CLI
  • •Generate vs manipulate vs render: tools rarely do all three
  • •Licence compatibility with your product (permissive vs copyleft)
  • •Server vs browser: client-side generation avoids uploading files
  • •Handling of encryption, forms and digital signatures
  • •Project activity and documentation quality

At a glance

ToolBest forPricingLicence
Stirling-PDFSelf-hosted PDF editing UI and APIFree MIT-licensed core (self-hosted); paid Server and Enterprise plans - see vendor pricingMIT
PDF.jsRendering PDFs in the browserFree, open sourceApache-2.0
Apache PDFBoxJava PDF manipulation and text extractionFree, open sourceApache-2.0
pypdfPython scripts that merge or split PDFsFree, open sourceBSD-3-Clause
pdf-libEditing and filling PDFs in Node or the browserFree, open sourceMIT
GotenbergHTML or Office to PDF as a microserviceFree, open sourceMIT
QPDFCLI PDF restructuring and encryptionFree, open sourceApache-2.0
pdfcpuGo services and CLI PDF processingFree, open sourceApache-2.0
jsPDFGenerating PDFs in the browserFree, open sourceMIT

1. Stirling-PDF

MIT

Best for: Self-hosted PDF editing UI and API · Free MIT-licensed core (self-hosted); paid Server and Enterprise plans - see vendor pricing

Stirling-PDF is an open-core PDF editing platform with a web UI and API you can self-host. The core is MIT licensed while proprietary directories and paid enterprise features exist.

Strengths

  • + Many operations in one self-hosted tool
  • + Web UI plus API

Trade-offs

  • − Open-core: some code is proprietary

2. PDF.js

Apache-2.0

Best for: Rendering PDFs in the browser · Free, open source

PDF.js is a community-driven PDF viewer built with HTML5 and supported by Mozilla.

Strengths

  • + Standard browser PDF viewer
  • + Apache-2.0

Trade-offs

  • − Viewer, not a generator

3. Apache PDFBox

Apache-2.0

Best for: Java PDF manipulation and text extraction · Free, open source

PDFBox is an open-source Java tool for creating, modifying and extracting content from PDF documents.

Strengths

  • + Mature Apache project
  • + Good extraction support

Trade-offs

  • − Java only

4. pypdf

BSD-3-Clause

Best for: Python scripts that merge or split PDFs · Free, open source

pypdf is a pure-Python library for splitting, merging, cropping and transforming the pages of PDF files.

Strengths

  • + Pure Python, easy install
  • + BSD-3-Clause licence

Trade-offs

  • − Not a layout or generation engine

5. pdf-lib

MIT

Best for: Editing and filling PDFs in Node or the browser · Free, open source

pdf-lib creates and modifies PDF documents in any JavaScript environment.

Strengths

  • + Runs client-side
  • + MIT licence

Trade-offs

  • − Fewer commits than larger projects; check recent activity

6. Gotenberg

MIT

Best for: HTML or Office to PDF as a microservice · Free, open source

Gotenberg is a developer-friendly API for converting many document formats into PDF files, and more.

Strengths

  • + HTTP API usable from any language
  • + MIT licence

Trade-offs

  • − Runs headless browser and office engines, so resource heavy

7. QPDF

Apache-2.0

Best for: CLI PDF restructuring and encryption · Free, open source

QPDF is a command-line tool and C++ library for structural PDF transformations such as linearization, encryption, splitting and merging. It does not render PDFs or extract text.

Strengths

  • + Reliable structural operations
  • + Apache-2.0

Trade-offs

  • − No rendering or text extraction

8. pdfcpu

Apache-2.0

Best for: Go services and CLI PDF processing · Free, open source

pdfcpu is a Go library and command-line tool for validating, optimizing, encrypting, signing and otherwise processing PDFs.

Strengths

  • + Single Go binary
  • + Apache-2.0

Trade-offs

  • − Go-centric ecosystem

9. jsPDF

MIT

Best for: Generating PDFs in the browser · Free, open source

jsPDF is a client-side JavaScript library for generating PDFs in the browser and in Node.js.

Strengths

  • + Client-side generation
  • + MIT licence

Trade-offs

  • − Layout is manual compared with HTML-to-PDF engines

New tools in this space, weekly

One email a week with the tools, launches and releases added to TechLogHub. Unsubscribe in one click.

Get the TechLogHub digest

One email a week: new and trending developer tools, fresh comparisons, and what shipped. Unsubscribe in one click.

How to choose

If you need…Start with
Self-hosted PDF editor for non-developersStirling-PDF
Convert HTML or Office files to PDF via APIGotenberg
Generate PDFs in the browserjsPDF, pdf-lib
Merge or split in Pythonpypdf
Java processingApache PDFBox
CLI restructuring or encryptionQPDF, pdfcpu

Best Open-Source PDF Tools and Generators: FAQ

Quick answers to common questions

What is the best open source PDF generator?

It depends on the language. jsPDF suits browsers, Gotenberg suits HTML-to-PDF services, and PDFBox suits Java.

Can I edit PDFs for free?

Stirling-PDF and pdf-lib both support editing, one as a self-hosted app and the other as a library.

Do these tools render PDFs?

PDF.js renders in the browser. QPDF explicitly does not render or extract text.

Are any of these copyleft?

All nine here use permissive licences (MIT, Apache-2.0 or BSD-3-Clause). Other projects such as PyMuPDF use AGPL.

Related categories

Building a tool in this category?

List it on TechLogHub and we'll review it for this guide.

Submit a tool