π A powerful Go web service for template-based PDF generation with multi-page support, PDF merging, form filling, and HTML to PDF/Image conversion.
92% Cost Reduction vs traditional distributed architectures.
| Metric | Industry Standard (Typst/LaTeX) | gopdfsuit (Go 1.24) |
|---|---|---|
| Infrastructure | ~40 Node Cluster | 2 Nodes (95% Less) |
| Cost (1.5M PDFs) | ~$10.20 / day | ~$0.77 / day |
| Throughput | ~1k PDFs/sec (Cluster) | ~600 PDFs/sec (Single Node) |
Result: Generates 1.5 million financial PDFs in ~45 mins on a single machine.
-
π Web Documentation - Interactive API documentation and playground
-
π Template Reference - Complete JSON template format guide with examples
-
π οΈ Makefile Reference - Build, test, and deployment commands
GoPdfSuit is a powerful Go web service for template-based PDF generation.
Key Features:
- Template-Based Generation: Create PDFs from JSON templates with auto page breaks and flow control.
- Security & Compliance: Digital signatures (PKCS#7, X.509), AES-256 encryption, granular permissions, and PDF/A-4 & PDF/UA-2 compliance.
- Advanced Elements: Rich text styling, tables, barcodes, QR codes, SVG vector graphics, and interactive forms (checkboxes, radio buttons).
- Navigation: Auto-generated bookmarks, internal links, and named destinations for easy document navigation.
- Form Filling: Fill generic AcroForms and XFDF data.
- Redaction: Securely redact sensitive information using specific coordinates or text search.
- Merge & Split: Combine multiple PDFs or split them.
- HTML Conversion: High-fidelity HTML to PDF/Image conversion using headless Chrome.
- Native Bindings:
- Python: Direct CGO bindings for high-performance integration.
- Go: Usable as a standalone Go library (
gopdflib).
- Web Interfaces: Built-in React UI for viewer, editor, merger, filler, and converters.
Requirements: Go 1.24+, Google Chrome (for HTML conversion)
Chrome not found error?
Install Google Chrome - required for HTML to PDF/Image conversion:
sudo apt install -y google-chrome-stableHow do auto page breaks work?
The system tracks Y position and creates new pages when content exceeds boundaries. Page borders and numbering are preserved across pages.
How do I create a digitally signed PDF?
Include the signature config with your PEM-encoded certificate and private key:
{
"config": {
"signature": {
"enabled": true,
"visible": true,
"certificatePem": "-----BEGIN CERTIFICATE-----\n...",
"privateKeyPem": "-----BEGIN PRIVATE KEY-----\n..."
}
}
}Supports RSA and ECDSA keys with optional certificate chains.
What is PDF/A-4 compliance?
PDF/A-4 is the archival standard based on PDF 2.0. Enable it with "pdfaCompliant": true. This embeds all fonts (via Liberation fonts), adds XMP metadata, and follows strict structure requirements for long-term preservation.
How do internal links work?
- Add a destination anchor to a cell:
"dest": "my-section" - Link to it from another cell:
"link": "#my-section" - Optionally add a bookmark:
{"title": "My Section", "dest": "my-section"}
XFDF form filling limitations?
Uses byte-oriented approach with /NeedAppearances true. Works for most AcroForms, but PDFs with compressed object streams may need a library like pdfcpu for full compatibility.
Performance benchmarks?
Sub-millisecond to ~7ms response times for complex 2-page financial reports. In-memory processing with zero external dependencies.
# Build
go build -o bin/gopdfsuit ./cmd/gopdfsuit
# Cross-compile
GOOS=linux GOARCH=amd64 go build -o bin/gopdfsuit-linux ./cmd/gopdfsuit
# Test
go test -cover ./...gopdfsuit/
βββ bindings/ # Native language bindings (Python CGO)
βββ cmd/gopdfsuit/ # Application entrypoint
βββ docs/ # Built frontend assets
βββ frontend/ # React frontend (Vite)
βββ guides/ # Documentation guides
βββ internal/
β βββ handlers/ # HTTP handlers
β βββ middleware/ # Gin middleware
β βββ models/ # Template models
β βββ pdf/ # PDF generation & processing
βββ pkg/
β βββ gopdflib/ # Standalone Go library
βββ sampledata/ # Sample templates & data
βββ test/ # Integration tests
- Fork the repository
- Create feature branch (
git checkout -b feature/amazing) - Commit changes (
git commit -m 'Add feature') - Push (
git push origin feature/amazing) - Open a Pull Request
MIT License - see LICENSE
Made with β€οΈ by Chinmay Sawant
β Star this repo if you find it helpful!
Developed from scratch with assistance from GitHub Copilot.