PDF/A and PDF/UA
PDF/A is the ISO standard for documents that must stay readable for decades. PDF/UA is the standard for accessible PDFs. Convert existing PDFs here, or ask for either while converting.
POST https://api.pdfdispatch.com/v1/pdf/pdfa
Form fields
| Field | Type | Default | What it does |
|---|---|---|---|
files required | file(s) | – | The PDFs to convert. |
pdfa | string | – | PDF/A-1b, PDF/A-2b or PDF/A-3b. Other levels are refused (400). |
pdfua | boolean | false | Make the file PDF/UA (universal accessibility). |
At least one of pdfa and pdfua is required.
Which level
| Level | Based on | Use it when |
|---|---|---|
PDF/A-1b | PDF 1.4 | a recipient insists on PDF/A-1. No transparency, no attachments. |
PDF/A-2b | PDF 1.7 | archiving in general. Keeps transparency and layers. A safe default. |
PDF/A-3b | PDF 1.7 | the file must carry attachments, such as the XML of an e-invoice. |
Examples
An existing PDF:
curl --fail-with-body \
--header "Authorization: Bearer $PDD_KEY" \
--form files=@invoice.pdf \
--form pdfa=PDF/A-2b \
--output invoice-archive.pdf \
https://api.pdfdispatch.com/v1/pdf/pdfa
Better: ask for it while converting, which saves a request and keeps more of the document’s structure:
curl --fail-with-body \
--header "Authorization: Bearer $PDD_KEY" \
--form files=@index.html \
--form pdfa=PDF/A-2b --form pdfua=true --form generateTaggedPdf=true \
--output invoice.pdf \
https://api.pdfdispatch.com/v1/convert/html
Good to know
- PDF/A documents cannot be encrypted; the API refuses the combination.
- Fonts are embedded and colours fixed to a profile; the file usually grows a little.
- A tool can only make a PDF accessible when the source has the structure: real headings, lists, table headers,
alttext on images, alangon<html>. For HTML, write semantic markup and addgenerateTaggedPdf=true.