Skip to main content

pdfa_conversion_failed

HTTP 500 · code: "pdfa_conversion_failed" · type: https://docs.formfeed.dev/errors/pdfa-conversion-failed

An e-invoice is a PDF/A-3b that carries the invoice as XML. The rendered PDF could not be made one, or the converted file did not pass the PDF/A check. The render is failed; no file is stored, no plain PDF is delivered instead, and a failed render costs nothing.

The problem carries one of two things:

  • einvoice, the report of the validator, when the converted file was checked and refused. Its validation.messages with "part": "pdf" name the clause of PDF/A (rule) and the object of the PDF (location). The failed render keeps the same report.
  • reason, the first line of what the converter said, when the PDF could not be converted at all.

Example​

{
"type": "https://docs.formfeed.dev/errors/pdfa-conversion-failed",
"title": "PDF/A conversion failed",
"status": 500,
"detail": "The PDF could not be made a valid PDF/A-3b: 1 finding",
"code": "pdfa_conversion_failed",
"location": null,
"render_id": "rnd_7da09ab6cd9946b798c187c2a9350852",
"einvoice": {
"profile": "en16931",
"flavour": "factur-x",
"spec_version": "1.09",
"xml_url": null,
"validation": {
"valid": false,
"schematron": "Factur-X 1.09.2 (Mustang 2.26.0)",
"pdfa": "PDF/A-3b",
"messages": [
{
"part": "pdf",
"severity": "error",
"rule": "6.2.11.4.1-1",
"message": "…",
"location": "…"
}
]
},
"display": null
},
"request_id": "req_4b7c1e9a2f3d4c5b8a6e7f9012"
}

Common causes​

  • A font that is not embedded (6.2.11.4.1-1). PDF/A needs every font inside the file. A PDF of the file library that is appended with post.merge_after can bring such a font.
  • A font whose embedded program disagrees with the widths the PDF states (6.2.11.5-1). The office converter writes such a font for OpenType fonts with CFF outlines, which on our side is the font for Chinese, Japanese and Korean text in a Word or PowerPoint template.
  • A failure of the converter itself, reported in reason.

How to fix it​

  • Read einvoice.validation.messages to see which clause of PDF/A the file breaks, and where.
  • For a font that is not embedded in an appended PDF: create that PDF again with its fonts embedded, or leave it out of the e-invoice.
  • For anything else, send the render_id to support@formfeed.dev. A document that Formfeed rendered and cannot convert is ours to fix.

Retry?​

No. The same document fails the same way. Async renders are not retried for this code either.