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