Skip to main content
Version: 9.x

Tag a PDF

Infers a structure tree for an untagged PDF, so screen readers can follow it.

POST/forms/pdf/autotag
filesfile[]required

The PDFs.

archivesfile[]

ZIP files Gotenberg unpacks: each entry counts as a file uploaded under files.

URLs Gotenberg downloads first, as if you had uploaded the files. Each entry takes a url, and optionally extraHttpHeaders.

No options.

The PDF, or a ZIP of the PDFs when you send several.

The route also takes the headers. An error answers a status and a message: see Errors.

Tag an existing PDF​

curl \
--request POST http://localhost:3000/forms/pdf/autotag \
--form files=@report.pdf \
-o report.pdf

/forms/pdf/info then answers "tagged": true. A PDF you make tags better at the source, from its HTML or its document: Chromium and LibreOffice take nativeTaggedPdf. For PDF/UA, remediate the PDF, which tags it too.

In a list of stages​

The stage also runs in a list on /forms/pdf/pipe, and on the PDFs a Chromium or LibreOffice conversion makes, in its stages field:

curl \
--request POST http://localhost:3000/forms/pdf/pipe \
--form files=@report.pdf \
--form 'stages=[
{ "op": "autotag" }
]' \
-o report.pdf