PDF/UA API

2 min read Original article ↗

report.html <article> <h1>Annual Report <h2>Summary <p>Revenue grew… <figure aria-label= "Chart"> </article> Annual Report 2024 Executive Summary invoice.json { "seller": { "ACME Corp." }, "lineItems": [{ "desc": "Widget Pro", "price": 49.00 }], "total": 68.00 Invoice#1042 DescriptionAmount Widget Pro49.00 Shipping19.00 Total68.00 request.json { "url": "https://example.com/ report", "embedColorProfile": true } example.com/report Tagged PDF PDF/UA

Accessible PDFs, by the standard.

A small, self-hosted HTTP API that turns HTML, URLs and JSON templates into PDF/A-3a documents with full PDF/UA accessibility — tagged structure, declared language and embedded fonts — in a single container with no external services.

Get Started View on GitHub

Pick the entry point that matches what you already have — all three produce the same accessible PDF/A-3a output.

From HTML

Send a complete HTML document to POST /render/html. Best when you already produce markup or use a templating engine. HTML to PDF →

From a URL

Send a public URL to POST /render/url and the API fetches the HTML for you. Best for static sites or server-rendered pages. URL to PDF →

From a template

Send a JSON template of rows and typed blocks to POST /render/template. Best for structured documents like invoices. Templates →

Validate & verify

Check any PDF against PDF/A-3a and PDF/UA-1 with POST /validate, or confirm a document came from this API. Quick Start →

The API ships as a single container — no databases, no headless browser, no external services.

docker run -p 8080:8080 ghcr.io/bambamboole/pdf-ua-api:latest

Then convert your first document:

curl -X POST http://localhost:8080/render/html \

-H "Content-Type: application/json" \

-d '{"html":"<html><head><title>Document</title></head><body><h1>Hello World</h1></body></html>"}' \

--output output.pdf

PDF render endpoints return application/pdf unless you explicitly send Accept: application/json, which returns { validation, pdf } with the PDF base64-encoded. That JSON response mode cannot be combined with X-Upload-Url.