Documentation

Selective PDF/A check profiles

Narrow verification to the rules you care about. Profiles are immutable clones, safe to share across concurrent calls, grouped by spec area.

Narrow verification to the rules you care about. Start from the full PDFA1B profile and remove checks, or start from an empty profile and add only what you need. Profiles are immutable — AddCheck, RemoveCheck and Clear each return a clone — so one profile can be shared across concurrent calls.

profiles.go
// Start from the full profile and remove checks
p := gopdfrab.PDFA1B.
	RemoveCheck(gopdfrab.Checks.Structure.FileHeaderSignature).
	RemoveCheck(gopdfrab.Checks.Font.SimpleNotEmbedded)

res, err := doc.Verify(p)

// Or start from an empty profile and add only what you need
p2 := gopdfrab.PDFA1B.Clear().
	AddCheck(
		gopdfrab.Checks.Transparency.ImageWithSoftMask,
		gopdfrab.Checks.Metadata.PDFAIdentifierMissing,
	)

res2, err := doc.Verify(p2)

Checks are grouped by spec area in the Checks registry:

Registry field Spec area
Checks.Structure6.1.x — file header, trailer, xref, object framing, limits
Checks.Colour6.2.2 OutputIntent, 6.2.3.x device colours, 6.2.9–10
Checks.Image6.2.4-6.2.7 image/form/PostScript XObjects
Checks.Transparency6.2.8 transfer functions, 6.4 soft masks/blend modes/alpha
Checks.Font6.3.x embedding, subsets, metrics, encoding
Checks.Annotation6.5.x annotation types and dictionaries
Checks.Action6.6.x action types and additional actions
Checks.Metadata6.7.x XMP metadata, extension schemas, PDF/A identifier
Checks.LogicalStructure6.8 tagged PDF structure hierarchy and marked content
Checks.Form6.9 interactive forms
Checks.ObjectModelGeneric ISO 32000 object-model conformance, independent of PDF/A

AllChecks() enumerates every registered check, and CheckByClause / ChecksForClause look checks up directly by clause.

lookup.go
gopdfrab.AllChecks()                       // every registered check, with names, descriptions, clauses
gopdfrab.CheckByClause("6.3.4", 1)          // a single check by clause + index
gopdfrab.ChecksForClause("6.3.4")           // all checks registered under a clause

Selective profiles are most useful as a triage tool rather than a way to lower the bar. Running only Checks.Font across a large corpus tells you quickly whether font embedding is your systemic problem, which is a different question from whether any individual file conforms.