Documentation
Open a document, verify it against a profile, convert what fails.
terminal
go get github.com/voidrab/gopdfrabmain.go
doc, _ := gopdfrab.Open("invoice.pdf")
defer doc.Close()
v, _ := doc.Verify(gopdfrab.PDFA2B)
for _, issue := range v.Issues {
fmt.Println(issue)
}
cr, _ := doc.Convert(gopdfrab.PDFA2B)
defer cr.Close()
cr.Save("invoice-a2b.pdf")- InstallAdd the library with go get, and the CLI with go install.
- Open a documentOpen from a path or from bytes, decrypt password-protected files, and read document metadata.
- VerifyCheck a file, bytes or a batch against PDF/A-1b or PDF/A-2b, and read the issues it reports.
- ConvertRewrite a PDF into PDF/A, check what could not be fixed, verify the pages still look right, and stream the output.
- ProfilesRun only the checks you care about, pick the Isartor-literal reading of PDF/A-1b, or check plain ISO 32000 validity.
- Options and limitsTune conversion, cancel with a context, and cap memory for untrusted input.
- ErrorsMatch failures with errors.Is. Damaged files are reported as issues, not returned as errors.
New to the standard? Read the guides, or try the browser converter.