Minimal zero-dependency TypeScript library for generating real PDF files with text, rectangles, lines, JPEG images and links.
carlos7ags/folio
A Go library for generating, editing and signing PDFs, with HTML to PDF conversion, a layout engine, forms, barcodes and PDF/A output.
Open-source alternative to:Adobe Acrobat
- Stars
- 873
- Forks
- 57
- Open issues
- 49
- Last commit
- 3 days ago
What is it?
Folio is a PDF library for Go. It provides a layout engine for paragraphs, tables, lists, flex containers and images, and it can convert HTML and CSS into PDF in-process without a headless browser. Pages can be built with the Go API, and existing PDFs can be imported as templates and filled with dynamic content.
Beyond generation, Folio reads and merges PDFs, extracts text, and permanently removes text through redaction. It also creates AcroForm fields, adds PAdES digital signatures (B-B, B-T and B-LT) with external signer support, and writes PDF/A and tagged PDF output. Text shaping covers left-to-right, right-to-left, Indic and CJK scripts. Barcodes include Code128, QR and EAN-13.
Folio ships a CLI for merging, inspecting and extracting text, and a C shared library that exposes its functions for use from other languages through FFI.
Key features
- 01Layout engine with tables, lists, flex containers, images and page-break splitting.
- 02HTML and CSS to PDF conversion that runs in-process.
- 03Text shaping for LTR, RTL, Indic and CJK scripts.
- 04Interactive AcroForm fields such as text, checkbox, radio, dropdown and signature.
- 05PAdES digital signatures with support for external signers like HSM or KMS.
- 06Text-based redaction that removes content from content streams.
- 07PDF/A and tagged PDF output, plus a C shared library and CLI.
Use cases
- Generating invoices, reports or receipts from Go backends.
- Filling existing PDF templates such as letterheads or certificates.
- Producing archival or accessible PDFs that need PDF/A or tagged output.
- Signing or redacting PDFs in a document processing pipeline.
Quick start
- 1
Install the library
go get github.com/carlos7ags/folio - 2
Create a Go file with the Hello World example from the README, then run it
go run main.go
Things to know
- Requires Go 1.25 or newer.
- Some HTML and CSS features are unsupported; see docs/CSS_SUPPORT.md.
Topics
FAQ
- What is folio?
- A Go library for generating, editing and signing PDFs, with HTML to PDF conversion, a layout engine, forms, barcodes and PDF/A output. Folio is a PDF library for Go. It provides a layout engine for paragraphs, tables, lists, flex containers and images, and it can convert HTML and CSS into PDF in-process without a headless browser. Pages can be built with the Go API, and existing PDFs can be imported as templates and filled with dynamic content.
- Is folio free to use? What license does it have?
- folio is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
- Is folio still maintained?
- Actively maintained. The last commit to folio was on Oct 17, 2026.
- What can I use folio for?
- Generating invoices, reports or receipts from Go backends. Filling existing PDF templates such as letterheads or certificates. Producing archival or accessible PDFs that need PDF/A or tagged output. Signing or redacting PDFs in a document processing pipeline.
- How do I install folio?
- Install the library: go get github.com/carlos7ags/folio Create a Go file with the Hello World example from the README, then run it: go run main.go
- Where can I get folio?
- The source code and installation instructions are on GitHub: https://github.com/carlos7ags/folio
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
Self-hosted open source platform to create PDF forms, fill them, and collect electronic signatures online.
A terminal TUI for browsing, connecting to, and managing SSH hosts defined in your ~/.ssh/config file.
A Go CLI for tmux that saves sessions, windows, panes and commands, then restores them lazily from a TUI picker.
A self-hosted, all-in-one software development service written in Go, covering Git hosting, code review, issues, packages and CI/CD.
A self-hosted online file converter supporting over a thousand formats, built with TypeScript, Bun and Elysia.