A small, self-hosted HTTP API that turns HTML, URLs and JSON into PDF/A-3a

robin_reala1 pts0 comments

PDF/UA API | PDF/UA API

Skip to content

report.html

Annual Report<br>Summary<br>Revenue grew…<br>aria-label=<br>"Chart">

Annual Report 2024<br>Executive Summary

invoice.json<br>"seller": { "ACME Corp." },<br>"lineItems": [{<br>"desc": "Widget Pro",<br>"price": 49.00<br>}],<br>"total": 68.00<br>Invoice#1042<br>DescriptionAmount<br>Widget Pro49.00<br>Shipping19.00<br>Total68.00

request.json<br>"url":<br>"https://example.com/<br>report",<br>"embedColorProfile": true<br>example.com/report

Tagged PDF<br>PDF/UA

Accessible PDFs, by the standard.<br>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

Three ways to create a PDF<br>Section titled “Three ways to create a PDF”

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

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

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

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

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

Run it in one command<br>Section titled “Run it in one command”

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

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

Then convert your first document:

Terminal windowcurl -X POST http://localhost:8080/render/html \

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

-d '{"html":"DocumentHello World"}' \

--output output.pdf

DocumentHello World<br>"}' \ --output output.pdf">

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

html json report output post render

Related Articles