mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-11-29 09:44:51 +01:00
Auto-tag Apply finds text that repeats near the top or bottom edge of most pages before assigning roles: the same text, digits and lone roman numerals aside, within 4 units of the same height, on at least 40% of the pages and at least two. It wraps that text in /Artifact <</Type /Pagination /Subtype /Header|/Footer>> BDC ... EMC with no MCID instead of tagging it (ISO 32000-2 14.8.2.2). A group of changing, heading-sized text is left as headings. Running text is left out of the body style and heading levels, MCIDs number the tagged objects only, and AutoTagResult counts headers and footers. a11y::running_text lists the findings without changing the document; accessibility_autotag_apply returns them as running_text and running_count, and its note says so. Adapted from pdfcer (MIT, same author) at ccb49b46, block_layout.rs, with distinct pages counted instead of objects. Closes #7065 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>