What PDF/A-1b actually requires

What each check group asks, and which ones real documents fail.

"PDF/A-1b conformant" is one yes or no. gopdfrab answers it with checks grouped by area of ISO 19005-1, plus a group for plain ISO 32000 validity. Here's what each group asks.

The groups

File structure

6.1.x — file header, trailer, xref, object framing, limits
Common failures: Encrypted document, Embedded files, LZW compression, Broken cross-reference table

Colour

6.2.2 OutputIntent, 6.2.3.x device colours, 6.2.9–10
Common failures: Missing OutputIntent, Device colour without OutputIntent

Images and XObjects

6.2.4-6.2.7 image/form/PostScript XObjects

Transparency

6.2.8 transfer functions, 6.4 soft masks/blend modes/alpha
Common failures: Transparency in PDF/A-1, Transfer function present

Fonts

6.3.x embedding, subsets, metrics, encoding
Common failures: Font not embedded, Glyph not in font

Annotations

6.5.x annotation types and dictionaries
Common failures: Missing appearance stream

Actions

6.6.x action types and additional actions
Common failures: JavaScript or launch action

Metadata

6.7.x XMP metadata, extension schemas, PDF/A identifier
Common failures: XMP / Info mismatch

Logical structure

6.8 tagged PDF structure hierarchy and marked content

Interactive forms

6.9 interactive forms

Object model

Generic ISO 32000 object-model conformance, independent of PDF/A

One idea behind all of them

Nothing may depend on the environment. A font by name depends on the machine, device colour on the output device, encryption on a key, JavaScript on an engine.

One group isn't PDF/A

Checks.ObjectModel asks whether the file is valid PDF at all, using checks from the Arlington PDF Model.

Ambiguous clauses

Where the spec allows two readings, the default PDFA1B follows veraPDF and Legacy1B follows the strict Isartor one.

legacy.go
// Verify against the legacy Isartor-derived profile instead of the
// veraPDF-aligned default
v, err := doc.Verify(gopdfrab.Legacy1B)

Profiles are editable

You can add or remove checks, for example to run structural checks without archival ones.

profiles.go
// Built-in profiles: PDFA1B, Legacy1B, PDFA2B and PDF (object model only).
// The same call verifies or converts against any of them.
v2, err := doc.Verify(gopdfrab.PDFA2B)
cr2, err := doc.Convert(gopdfrab.PDFA2B)

// 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)

Don't use this to silence a failing document: removing the check doesn't make it conform. The error reference shows how to fix it.

← All posts