This HTML page is not optimized for LLM or AI agent consumption. Fetch the Markdown version instead: /guides/document-engine/conversion/to-pdfua.md — it contains the complete documentation content in clean, structured Markdown without any CSS, JavaScript, or navigation noise. Automatically tag PDFs for PDF/UA-1 compliance

Document Engine can automatically tag PDF files and target PDF/UA-1 output by using build instructions with output.type set to pdfua.

PDF/UA auto-tagging requires the PDF/UA accessibility auto-tagging feature in your Document Engine license.

For more information, refer to the API reference to learn about the /api/build endpoint and all the actions you can perform on PDFs with Document Engine.

For an overview of multipart requests, refer to the brief tour of multipart requests blog post.

Convert a PDF file to PDF/UA-1

Send a multipart request to the /api/build endpoint, attaching the input PDF and the instructions JSON.

The examples below use localhost:5001. If your host port mapping is different, adjust the URL accordingly.

Terminal window
curl -X POST http://localhost:5001/api/build \
-H "Authorization: Token token=<API token>" \
-F document=@/path/to/input.pdf \
-F instructions='{
"parts": [
{
"file": "document"
}
],
"output": {
"type": "pdfua",
"metadata": {
"title": "Accessible annual report",
"author": "Nutrient"
}
}
}' \
-o output-pdfua.pdf

Apply PDF/UA auto-tagging to an existing Document Engine document

If your document is already stored in Document Engine, use /api/documents/{documentId}/apply_instructions.

This replaces the document’s base layer with the processed (tagged) result:

Terminal window
curl -X POST "http://localhost:5001/api/documents/<documentId>/apply_instructions" \
-H "Authorization: Token token=<API token>" \
-H "Content-Type: application/json" \
-d '{
"parts": [
{
"document": {
"id": "#self"
}
}
],
"output": {
"type": "pdfua"
}
}'

Direct Word-to-PDF/UA conversion

In Document Engine 1.19.0 and later, the Build API can convert a Word document to PDF/UA in a single processing step. Document Engine takes this path when the Word document is the only build part and the pdfua output requests no other PDF processing.

This path preserves the structure from the Word document instead of reconstructing tags from an intermediate PDF. Builds with multiple parts, actions, page ranges, or additional output options continue to convert the assembled PDF to PDF/UA.

Validate PDF/UA-1 conformance

Document Engine 1.18 and later can validate PDF/UA-1 conformance with the POST /api/validate_pdfua endpoint. Use it in QA workflows after auto-tagging, or to check an existing PDF before distribution:

Terminal window
curl -X POST http://localhost:5001/api/validate_pdfua \
-H "Authorization: Token token=<API token>" \
-F document=@/path/to/output-pdfua.pdf

The endpoint accepts uploaded PDFs, remote URLs, and existing Document Engine documents, and it returns a machine-readable validation report.

Notes and best practices

  • pdfua output returns a PDF file (application/pdf).
  • Auto-tagging reduces manual accessibility work but doesn’t replace validation. High-stakes, regulated, and strict-compliance workflows should check the output in a quality assurance (QA) process.
  • You can combine pdfua with other base PDF output model options, such as metadata and optimization.
  • Some optional output settings may require additional licensed features in your Document Engine deployment.