Long-term archiving · Go

Create PDF/A in Go

Generate archival-grade PDF/A from Go with one method call. rust-pdf embeds the sRGB ICC profile, adds the output intent, writes the XMP metadata and document ID, and enforces the rules, so the output validates under veraPDF, the reference validator.

Why Go needs this

Go's PDF story is fragmented: gofpdf is archived and unipdf is commercial, so production-grade output usually means a paid dependency or a brittle wrapper.

PDF/A is the version of PDF built to last: every font and color profile is sealed inside the file so it renders identically decades from now. It is mandatory for e-invoicing, public-sector archiving, legal, healthcare and finance. rust-pdf produces and validates PDF/A-1b, 2b, 2a, 3b and 3a.

  • Levels A-1b, A-2b, A-2a, A-3b and A-3a, with the accessible a-levels building a full tagged structure tree.
  • Fonts embedded and subset automatically, ICC profile and output intent added for you.
  • XMP metadata kept in sync with the document info, validated by veraPDF.

Create PDF/A in Go with rust-pdf

Install the package, then call the same idiomatic API every rust-pdf binding shares. The snippet below is real Go code from the reference docs.

Go
doc, _ := rustpdf.New()
defer doc.Close()
_ = doc.PdfaLevel(rustpdf.A2b)
_ = doc.SetInfo(rustpdf.Info{Title: "Q3 Report", Author: "Acme Inc."})
f, _ := doc.AddFontFile("Roboto-Regular.ttf")
_ = doc.AddPage()
_ = doc.ShowText(f, 20, 72, 760, "Archival report", 0)
if err := doc.Save("report_pdfa.pdf"); err != nil {
	log.Fatal(err)   // *Error without a license granting PDF/A
}
Validated by: veraPDFqpdfmutool

Go basic generation is free. PDF/A is a corporate feature, unlocked by one offline license token. See pricing & licensing.

Full Go reference in the documentation.

PDF/A in Go: FAQ

Which PDF/A levels are supported in Go?

rust-pdf creates PDF/A-1b, 2b, 2a, 3b and 3a. Use a basic b-level for visual fidelity, an a-level for an accessible tagged structure, or a 3-level when you need to embed source files such as an e-invoice XML.

How is conformance verified?

Output is validated with veraPDF, the open-source reference validator for PDF/A, plus qpdf and mutool for structure. The claim is backed by validators, not adjectives.

Do I need a license to create PDF/A in Go?

PDF/A is a corporate feature and requires an active license token. Basic generation in Go is free. One offline token unlocks PDF/A in every supported language.

Create PDF/A in Go (Archival PDF)

One Rust core, the same output across every language. Prototype for free, license the corporate features when you ship.