Tagged PDF (PDF/UA) Publish Conformance Gate avatar

Tagged PDF (PDF/UA) Publish Conformance Gate

Pricing

from $10.00 / 1,000 run_starts

Go to Apify Store
Tagged PDF (PDF/UA) Publish Conformance Gate

Tagged PDF (PDF/UA) Publish Conformance Gate

Audit the PDF files that you publish against the tagged-document rules of PDF/UA-1, PDF/UA-2 or WCAG 2.2. The Actor downloads each file once, reads its structure tree, and reports every untagged item, every figure without alternative text, every table wit

Pricing

from $10.00 / 1,000 run_starts

Rating

0.0

(0)

Developer

kingii98

kingii98

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

5 days ago

Last modified

Categories

Share

Audit the PDF files that you publish against the tagged-document rules of PDF/UA-1, PDF/UA-2 or WCAG 2.2, before the file goes on the website.

Give the Actor a bounded list of PDF URLs. The Actor downloads each file once, reads its structure tree, and writes one dataset row for each file plus one gate summary row. It does not crawl, it does not log in, it sends no credential, and it uses no browser and no proxy.

A failed gate is a result, not a failed run. The run always ends with success, and the verdict is in the dataset and in the run status message.

Input

FieldTypeDefaultFunction
pdf_urlsarray of stringsthree public example files1 to 500 absolute HTTPS URLs of PDF files.
profilestringPDF/UA-1PDF/UA-1, PDF/UA-2 or WCAG-2.2-document.
max_pages_per_fileinteger200How many pages of one file the Actor reads.
fail_onarray of strings["error"]The severities that give a file the verdict fail.
timeout_seconds_per_fileinteger60Download timeout of one file.

Every field has a default, so a run with empty input audits the public example fixture in .actor/default_input.json.

Output

One row for each file, with record_type file:

file_url, http_status, bytes, page_count, pages_audited, is_encrypted, is_tagged, tag_tree_depth, document_language_set, title_set, display_doc_title_flag, images_total, images_without_alt_text, tables_without_header_scope, headings_out_of_order, untagged_content_items, reading_order_conflicts, form_fields_without_label, findings[] and verdict (pass, fail or unreadable).

Each entry of findings[] holds rule_id, severity, page, object_path and message.

One summary row, with record_type summary: files_requested, files_audited, files_pass, files_fail, files_unreadable, findings_by_rule, findings_by_severity and gate_result.

Rules

The profile sets the severity of each rule. A rule that a profile does not state is not applied.

RulePDF/UA-1PDF/UA-2WCAG 2.2Function
PDFUA-TAGGEDerrorerrorerrorThe document has /MarkInfo /Marked true and a /StructTreeRoot.
PDFUA-LANGerrorerrorerrorThe document states a default language.
PDFUA-TITLEerrorerrorerrorThe document states a title in XMP dc:title or in /Info /Title.
PDFUA-DISPLAY-TITLEerrorerrorwarning/ViewerPreferences /DisplayDocTitle is true, so the reader shows the title and not the file name.
PDFUA-XMP-IDENTerrorerrorThe XMP metadata states the pdfuaid:part of the profile.
PDFUA-FIGURE-ALTerrorerrorerrorEach figure holds alternative text.
PDFUA-UNTAGGED-CONTENTerrorerrorerrorNo content is outside the structure tree and unmarked as an artifact.
PDFUA-TABLE-HEADERSerrorerrorerrorEach table holds header cells, and each header cell states its scope.
PDFUA-HEADING-ORDERerrorerrorwarningThe heading levels go down one step at a time.
PDFUA-FORM-LABELerrorerrorerrorEach form field holds a label or a tooltip.
PDFUA-READING-ORDERwarningwarningwarningThe structure order agrees with the content order of the page.
PDFUA-TAG-DEPTHwarningwarningwarningThe structure tree is more than one level deep.
PDFUA-OUTLINEwarningA document of 10 pages or more holds a bookmark list.
PDFUA-PAGES-TRUNCATEDinfoinfoinfoThe page cap of the run stopped the audit before the last page.
PDFUA-UNREADABLEerrorerrorerrorThe Actor could not download the file or could not read its structure.

Pricing

The Actor uses the pay-per-event model. It charges these three events:

EventUnitFunction
run_startone for each runThe container start and the input read. Charged once, before the Actor reads the input.
pdf_auditedone for each file that the Actor reads and auditsThe download and the structure parse of one file. A file that the Actor could not download is not charged.
page_batch_over_50one for each 100 pages above the first 50 pages of a fileThe extra parse time of a long document. A file of 50 pages or fewer charges none.

Each event is charged once for the whole run, with the total count. The Actor never charges more than the run's maximum total charge allows.

Limits

  • 1 to 500 URLs for each run, HTTPS only, no credentials in the URL.
  • Loopback, private and reserved addresses are refused, and every redirect hop is checked again.
  • 3 redirect hops, 32 MB for each file, 5 parallel downloads.
  • 1 to 5000 pages for each file, 5 to 300 seconds for each download.

Development

uv sync
uv run pytest
uv run ruff check .