v1.0.1 — Pure Go PDF Library

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

gpdf
2ms
gofpdf
15ms
gopdf
20ms
Maroto v2
45ms

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.

MIT License
GitHub Stars
Contributors