PDF UA API
PDF UA API turns HTML into PDF/A-3a documents with full PDF/UA accessibility — tagged structure, a declared document language, and embedded fonts — so the output is both long-term archivable and screen-reader friendly.
On top of raw HTML it offers a structured JSON template language: you describe a document as rows of typed blocks — text, headings, tables, images, key‑value pairs — and the API handles the layout. This keeps content and presentation separate from your application code, which is handy for documents like invoices.
Beyond conversion it validates existing PDFs, identifies documents it produced, and renders HTML to images, all over a small HTTP API that runs as a single container with no external services.
Two ways to create a PDF
Section titled “Two ways to create a PDF”You can drive the API with raw HTML or with a structured template, depending on what you already have:
- From HTML — send a complete HTML document to
POST /convert. Best when you already produce markup or use a templating engine. See HTML to PDF. - From a template — send a JSON template of rows and blocks to
POST /render/template. Best for structured documents like invoices, where layout and data stay separate. See Templates.
Both paths produce the same accessible PDF/A-3a output.
Highlights
Section titled “Highlights”- HTML → accessible PDF/A-3a conversion
- Built-in PDF/A & PDF/UA validation
- Bundled open-source fonts, full CSS 2.1 styling, automatic table pagination
- Editable, live HTML→PDF and template examples
Built with
Section titled “Built with”The API stands on a handful of well-established open-source libraries — follow the links for their own documentation:
- Ktor — the Kotlin HTTP server framework that powers the endpoints.
- OpenHTMLToPDF — renders HTML and CSS to PDF/A and to images.
- Apache PDFBox — reads and writes the underlying PDF documents.
- veraPDF — validates output against the PDF/A and PDF/UA standards.