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"
}
}'

Notes and best practices

  • pdfua output returns a PDF file (application/pdf).
  • Auto-tagging reduces manual accessibility work, but you should still validate output in your QA process for high-stakes or regulated workflows and strict compliance requirements.
  • You can combine pdfua with other PDF output options available in the base PDF output model (for example, metadata and optimization options).
  • Some optional output settings may require additional licensed features in your Document Engine deployment.