Skip to main content

Remediate

remediate repairs a PDF until it conforms to a profile, or to a PDF/A profile and a PDF/UA one together.

PDF/A

profile takes "PDF/A-1a", "PDF/A-1b", "PDF/A-2a", "PDF/A-2b", "PDF/A-2u", "PDF/A-3a", "PDF/A-3b", "PDF/A-3u", "PDF/A-4", "PDF/A-4e" or "PDF/A-4f". The letter sets how much the PDF keeps: b its look, u its text as Unicode too, a its structure too. Pick the level your archive or portal asks for.
PDF/A-4f needs an embedded file: attach one first.

PDF/UA

"PDF/UA-1" and "PDF/UA-2" make the PDF accessible, and tag it if it isn’t. Set language, and describe figures in your HTML’s alt text, or with figureAltText.

PDF/A and PDF/UA together

Pass a pair: PDF/A-1 to PDF/A-3 (and Factur-X) pair with "PDF/UA-1", PDF/A-4 with "PDF/UA-2". TypeScript only accepts these pairs.

Factur-X

profile: "Factur-X" makes the PDF a PDF/A-3 e-invoice, the format Germany also publishes as ZUGFeRD.
On a conversion:

Check the result

Gotenberg answers 200 even when violations remain. It counts them in a Gotenberg-Remediation-Residual response header, which Chromiumly doesn’t return: call PDF.validate() on the result to confirm it conforms.

Remediate last

A list takes one remediate, so a pair goes in one stage. It comes after the stages that change the content: only encrypt, optimize, sign, timestamp, render and the extracts may follow it. A PDF/A or Factur-X can’t be encrypted. LibreOffice can also export PDF/A and PDF/UA directly with nativePdfa and nativePdfua — see LibreOffice. Chromium can’t: use remediate.

Validate

PDF.validate() checks PDFs against a profile, or a PDF/A–PDF/UA pair, and lists the violations.
A fatal violation makes the PDF non-compliant. A warning, which only the Factur-X Schematron rules raise, doesn’t.

Autotag

autotag infers a structure tree for an untagged PDF, so screen readers can follow it. PDF/UA requires one; remediate with a PDF/UA profile tags an untagged PDF on its own.

Prepare for print

  • convert-colors converts every color to one color space: target takes "cmyk", "rgb", "gray", or "output-intent" for the document’s own output intent.
  • flatten-transparency replaces transparent content with opaque content, for printers and archival formats that don’t support transparency.
See Reference — PDF.