Introducing gopdfrab: PDF/A verification and conversion for Go
Why, what it does, what it doesn't, and how it's tested.
gopdfrab verifies PDFs against PDF/A-1b and converts the ones that fail. It ships as a Go library, a single CLI binary and a WebAssembly build.
Why
You could already validate PDF/A, but not from inside a Go program. Existing tools are things you run, not things you import: a subprocess to manage, output to parse, an extra runtime to deploy. gopdfrab is a Go package with typed errors, and it cross-compiles anywhere Go does.
What it does
- PDF/A-1b and PDF/A-2b coverage 204 checks in 11 groups, passing the full Isartor and veraPDF suites.
- PDF to PDF/A conversion Fixes what it can, rasterizes as a last resort, and reports anything left over.
- Library and CLI The same engine as a Go package or a single binary.
- Object-model verification ISO 32000 checks from the Arlington PDF Model: is this valid PDF at all?
- Encrypted PDFs RC4 and AES decryption, with the empty password or one you supply.
- Damage recovery Damaged files are reported, not fatal, and rebuilt where possible.
What it doesn't do
- PDF/A-2, -3, -4 and PDF/UA. Later parts are on the roadmap.
- Create PDFs. Generate with another library, then verify the output.
Testing
The Isartor and veraPDF suites pass in full in CI, next to a differential test against veraPDF itself. On top of that: generated broken files and three levels of fuzzing.
1.0 is stable. Dual-licensed under the AGPL 3.0 or a commercial license. Start with the docs or the converter.