Quick Start
This guide gets a PDF out of the API in two steps: start the server, then send it some HTML.
Run the API
Section titled “Run the API”The quickest way to run the API is the published Docker image, which bundles the JVM, the fonts,
and everything else it needs. Start it and expose port 8080:
docker run -p 8080:8080 ghcr.io/bambamboole/pdf-ua-api:latestThe API is now listening on http://localhost:8080. By default it runs without authentication
and with rate limiting enabled — see Authentication and
Rate Limiting to change either.
Convert your first PDF
Section titled “Convert your first PDF”Send a complete HTML document to POST /convert. The response body is the binary PDF, so write
it straight to a file with --output:
curl -X POST http://localhost:8080/convert \ -H "Content-Type: application/json" \ -d '{"html":"<html lang=\"en\"><head><title>Hello</title></head><body><h1>Hello PDF</h1></body></html>"}' \ --output output.pdfOpen output.pdf and you have an accessible PDF/A-3a document. Always include a lang attribute
and a <title> — both are required for the accessibility tags to be generated.
Next steps
Section titled “Next steps”- Learn which HTML and CSS the renderer supports, and try it live in the browser, on the HTML to PDF page.
- Build structured documents without hand-writing HTML using Templates.
- Explore every endpoint in the API Reference.