Generate PDFs at Lightning Speed
A pure Go, zero-dependency PDF generation library. First-class CJK support, 10-30x faster than alternatives, with a declarative 12-column grid system.
$ go get github.com/gpdf-dev/gpdf // Generate a PDF in 3 lines doc := gpdf.New() doc.AddPage(gpdf.A4()). Row(func(r) { r.Col(12).Text("Hello, PDF!") }) doc.Output("hello.pdf")
Why gpdf?
Built for performance, simplicity, and global text support
Zero Dependencies
Pure Go, stdlib only. No CGO, no external libraries. Simple deployment with a single binary.
First-Class CJK Support
Native Japanese, Chinese, and Korean text rendering with TrueType font embedding. No tofu, no mojibake.
10-30x Faster
Benchmarked against gofpdf, gopdf, and Maroto v2. Generate complex PDFs in under 5ms.
12-Column Grid
Bootstrap-style declarative layout system. Build complex documents with rows, columns, and responsive spacing.
Benchmark Results
Invoice generation with Japanese text, fonts, and images
Ready-to-Use Templates
Beautiful, production-ready PDF templates for common use cases
Open Source
MIT licensed. Free forever. Community driven.
gpdf is fully open source under the MIT license. Star us on GitHub, contribute, or use it in your commercial projects.