PDF/A-3
PDF/A-3 is an archival PDF that can carry attached files. ZATCA accepts it for sharing and storing invoices when the XML is embedded; submission stays XML.
PDF/A-3 is a version of PDF built for long-term archiving that allows files to be embedded inside the PDF. ZATCA's guidelines say Phase 2 invoices are generated as XML or as PDF/A-3 with the XML embedded, and the cleared invoice is shared with the buyer and stored in either format.
Submission to ZATCA, however, is always XML, never PDF/A-3: clearance and reporting both take the XML through the API. The PDF is the human-readable copy; the XML embedded in it is the legal invoice.
What goes wrong: a plain PDF (not PDF/A-3), or one without the XML inside, is not the format the guidelines describe. The PDF's figures must match the XML: if the PDF is computed from different data than the XML, the printed amount can differ from the filed one. A scanned paper invoice is not an electronic invoice at all.
On Matheel, send "pdf": true with the invoice and the response includes pdf: an A4 PDF/A-3b in Arabic and English with the QR code and the legal XML embedded, its figures from the same calculation that wrote the XML. If rendering fails, the invoice still stands: pdf: null plus a warning.
Example
{"device_token": "mdt1.…", "pdf": true, "invoice": {"type": "simplified", "line_items": [{"name": "…", "quantity": 1, "price": "130.43"}]}}
→ "pdf": "JVBERi0xLjc…"
FAQ
Do I submit the PDF to ZATCA?
No. ZATCA takes XML only. PDF/A-3 is for the buyer and your archive.
Which copy is the legal invoice, the PDF or the XML?
The XML. In a PDF/A-3 the XML is embedded inside the file, so keep both with the order.
Related terms
Let Matheel handle this for you
Matheel signs the invoice, files it with ZATCA and keeps the counter and hash in one request, and returns the PDF with the QR.
Try Matheel, no signup Matheel API docs