PDF/UA-1 · CLAUSE 6.1
Malformed PDF file header
The file does not start with a well-formed %PDF-1.n header followed by a single end-of-line marker.
Why it matters
Strict parsers may reject the file. It usually indicates the file was assembled or truncated by a tool that does not write conforming PDF.
How to fix it
- Re-save the file with a standards-compliant PDF producer.
- Check any post-processing step that concatenates or rewrites the file bytes.
- Validate the output of your generation pipeline, not just the source document.
What the standard says
The file header shall consist of "%PDF-1.n" followed by a single EOL marker, where 'n' is a single digit number between 0 (30h) and 7 (37h)
Check your own PDF
Validate a file against PDF/UA-1 and see whether this rule fails in your document.
curl -sS -X POST "https://api.ua1.dev/api/validate?format=compact&profile=ua1" \ -F "file=@document.pdf"