Back to browse
GitHub Repository

Java PDF generation, signing, and processing library. Apache 2.0 licensed.

6 starsJava

Folio Java PDF library – signatures, redaction, HTML to PDF. Apache 2.0

by carlos7ags·Apr 9, 2026·2 points·0 comments

AI Analysis

●●●BangerSolve My ProblemWizardry

Go engine bundled via Panama FFI beats iText's AGPL licensing trap.

Strengths
  • Panama FFI (JEP 454) bundles Go engine in JAR—no JNI, no separate process.
  • Apache 2.0 license solves iText's AGPL problem for closed-source commercial apps.
  • Clean fluent API with HTML-to-PDF, PAdES signatures, and redaction built in.
Weaknesses
  • Requires JDK 22+ with native access flag, limiting adoption on older Java versions.
  • New library means less community support and fewer Stack Overflow answers than iText.
Target Audience

Java developers needing PDF generation without licensing restrictions

Post Description

iText is AGPL, use it in a closed-source app and you need a commercial license. I wanted a Java PDF library with a clean API and no licensing strings attached, so that's what Folio is.

The engine is written in Go and ships bundled in the JAR via Panama FFI (JEP 454). No JNI, no separate process. JDK 22+, one flag: --enable-native-access=ALL-UNNAMED.

Document.create("report.pdf", doc -> { doc.add(Heading.of("Q3 Report", HeadingLevel.H1)); doc.add(Paragraph.of("Revenue grew 23% year over year.")); doc.add(Table.of( new String[]{"Product", "Revenue"}, new String[]{"Widget A", "$48,000"} )); });

HTML to PDF is a one-liner:

HtmlConverter.toPdf("<h1>Invoice</h1><p>Due: $1,200</p>", "invoice.pdf");

Beyond that it covers PAdES signatures, PDF redaction, Flexbox and Grid layout, forms, barcodes, SVG, PDF/A, and encryption. Zero runtime dependencies.

https://github.com/carlos7ags/folio-java

Go engine: https://github.com/carlos7ags/folio

Playground (runs the Go engine directly): https://playground.foliopdf.dev

Similar Projects

Developer Tools●●Solid

Fullbleed – Rust HTML/CSS-to-PDF with Deterministic Output+Python CLI

It skips headless Chromium entirely and implements an HTML/CSS-to-PDF pipeline in Rust, exposing a Python wheel and CLI that releases the GIL and uses Rayon for parallel batch renders. The deterministic bits — fixed-point base unit, --repro-record/--repro-check, SHA256 outputs and vendored assets — are a clear, practical play for audited VDP/transactional workflows; what's still unknown is CSS spec coverage and whether subtle print-layout quirks will require hand-holding.

WizardryNiche Gem
krflol
203mo ago