tag

Auto-tag a PDF for accessibility using OpenDataLoader

Usage

pdftl <input> tag [<option>...] output <file>

Details

Auto-tag a PDF file for accessibility (PDF/UA readiness) using OpenDataLoader.

This operation runs the OpenDataLoader auto-tagging pipeline to perform layout analysis, structure discovery, and inject standard accessibility tags following the Well-Tagged PDF specification.

Options

Options are specified as key=value arguments:

  • table_method=<default|cluster> Table detection method. default is border-based, cluster uses borders and clustering.

  • reading_order=<off|xycut> Reading order algorithm. Default is xycut.

  • pages=<spec> Specific pages to tag (e.g., 1,3,5-7). Default is all pages.

  • threads=<int> Number of worker threads for parallel per-page processing (native Java pipeline only).

  • hybrid=<off|docling-fast|hancom-ai> Enable a hybrid backend server for advanced layout analysis.

  • hybrid_mode=<auto|full> Hybrid triage mode. Default is auto.

  • hybrid_url=<url> Custom hybrid backend server URL.

Note: This operation requires Java 11+ to be installed on your system and available on your PATH, as well as the opendataloader-pdf Python package. THe hybrid options require further infrastructure to be set up; see the OpenDataLoader documentation for details.

See also

The set operation may be used to set the document language and title, for enhanced accessibility.

Examples

Auto-tag the entire PDF with default settings.

pdftl in.pdf tag output out.pdf

Auto-tag using the cluster table method and the docling-fast hybrid backend.

pdftl in.pdf tag table_method=cluster hybrid=docling-fast output out.pdf

Auto-tag only the first 5 pages using 4 parallel threads.

pdftl in.pdf tag 1-5 threads=4 output out.pdf

Tags: accessibility, tagging, tagged-pdf, pdf-ua, tags

Source: pdftl.operations.tag

Read online: https://pdftl.readthedocs.io/en/latest/operations/tag.html

Type: Operation