PDF/A
Introduction
Use this guide when you need archival-oriented PDF output (ISO 19005/PDF-A) and want to control validation behavior directly in the conversion request.
Prerequisites
- A PolyDoc account and API key — sign up for free, no credit card required. The free plan includes 150 PDF conversions per month.
- A PDF conversion flow (HTML or URL source) that you want to archive or validate for compliance workflows.
Configuration
Enable PDF/A conversion
Set
pdf.pdfa in your request payload to post-process the generated PDF toward PDF/A conformance (ISO 19005)."3b" is recommended for HTML-to-PDF workflows because Chromium rendering can include transparency, which PDF/A-1b forbids. See pdf.pdfa.level in the API reference.{
"source": "https://example.com/invoice/INV-2026-042",
"pdf": {
"pdfa": {
"level": "3b"
}
}
}
Verify compliance
Set
pdf.pdfa.verify to true to require PDF/A compliance: VeraPDF runs after conversion, and if the output is not compliant the API responds with 422 Unprocessable Entity (JSON body with code: "PDFA_VERIFICATION_FAILED" and rule summaries in pdfa). No PDF is returned in that case. When verification succeeds, you get a normal 200 response with the PDF body (same as without verify); compliance is implied by the absence of 422.Omit
verify or set it to false for best-effort conversion without a strict compliance guarantee.{
"source": "<html><body><h1>Archive copy</h1></body></html>",
"pdf": {
"pdfa": {
"level": "3b",
"verify": true
}
}
}
Example request
{
"source": "<html><body><h1>Invoice INV-2026-042</h1></body></html>",
"layout": {
"format": "A4"
},
"pdf": {
"pdfa": {
"level": "3b",
"verify": true
}
}
}