Pure Go PDFs,
no coordinates.
gpdf is an open-source, MIT-licensed PDF generation library for Go. 0 external dependencies — Go standard library only. Declare layouts on a 12-column grid, embed TrueType fonts for Japanese, Chinese, and Korean, and render a single-page document in roughly 13 µs — 10–30× faster than gofpdf, gopdf, and Maroto v2.
Speed in numbers
measured on a cjk invoice
1 block = 2 ms
Benchmark: invoice generation with Japanese text, 3 embedded TrueType font subsets, 1 logo, 1 QR code. Measured per document on Go 1.25 / Apple M2. Numbers are rounded; exact values vary per run.
Why teams ship on gpdf
built for real production pdfs
- 0 external dependencies
- Go standard library only. No CGO, no C toolchain, no native modules. Reproducible builds every time.
- 12-column grid
- Rows and columns that sum to 12. Familiar from Bootstrap. Nestable to any depth.
- CJK in 3 scripts
- Embed TrueType fonts. Render Japanese (JP), Chinese (ZH), and Korean (KR) without any external tooling.
- 10–30× faster
- ~13 µs per page on a single-page document. Benchmarked against gofpdf, gopdf, and Maroto v2.
- Fluent Builder API
- PageBuilder → RowBuilder → ColBuilder. Functional options (WithXxx) for every configuration knob.
- JSON Schema + Go Templates
- Declare PDF structure as JSON, drive it with text/template, and generate thousands of documents from a single source of truth.
Frequently asked questions
answers before you ship
gpdf is a pure Go, MIT-licensed PDF generation library with 0 external dependencies. It uses a Bootstrap-inspired 12-column grid for layout and supports CJK (Japanese, Chinese, Korean) natively via TrueType font embedding.
gpdf renders a single-page document in approximately 13 microseconds — 10 to 30 times faster than gofpdf, gopdf, and Maroto v2 in benchmark comparisons.
Yes. gpdf embeds TrueType fonts and natively renders Japanese (JP), Chinese (ZH), and Korean (KR) — all 3 CJK scripts — without tofu (□) or mojibake.
Yes. gpdf is fully open source under the MIT license. Free for personal and commercial use, including redistribution.
Run: go get github.com/gpdf-dev/gpdf. Requires Go 1.22 or later (tested through Go 1.26). 0 external dependencies — the library uses only the Go standard library.
Ship PDFs today.
MIT licensed. Free forever. Tested on Go 1.22 through 1.26. One go get away.