One embedded or associated file: the file-specification metadata plus the
object id of its embedded-file stream (when it carries one). The payload is
not decoded here — fetch it with crate::PdfDocument::embedded_file_bytes.
Per-document cache of ICCBased profile streams → compiled transforms,
keyed by the profile stream’s object id AND the rendering intent (the same
profile may be requested under different intents on one page). Failures are
cached as None so a malformed profile is parsed (and warned about) once.
Mapping from source-document object IDs to destination object IDs,
built up while copying. Reusable across multiple copy_object_graph
calls against the same (source, destination) pair so shared resources
(fonts, images) are copied once.
An axis-aligned ruled line captured from page content (a thin stroke or a
thin filled rectangle), in PDF user space (y-up). Produced by running the
interpreter with ContentInterpreter::with_rule_sink; consumed by
detect_tables_with_rules as drawn table-grid evidence.
Common document metadata read from the XMP packet. Every field is optional;
producers populate an arbitrary subset, and a field may be present in XMP but
not in /Info (or vice-versa).
How a destination positions and zooms the target page (ISO 32000-1 Table
151). Coordinates are in the page’s default user space; None for a
coordinate means “retain the current value” (a null in the array).
Offline certificate-revocation status, derived from CRLs embedded in the
signature CMS or the document’s /DSS. OCSP/CRL fetching over the network
is out of scope (the project has no network dependency); this checks only
the revocation material already embedded in the file.
A standard structure type (ISO 32000-1 §14.8.4), the role of a structure
element after resolving its /S through the document’s /RoleMap. A type
outside the standard set (and not mapped onto it) is StructRole::Other.
Copy source_id and everything reachable from it out of source_file
into writer, renumbering references. Returns the destination ID of the
root. Objects already present in id_map are not copied again.
detect_tables, additionally informed by drawn ruled lines (captured via
ContentInterpreter::with_rule_sink). Vertical rules that span a band act
as forced column separators — they establish columns even where the text
alone leaves no clean whitespace gutter — and a band whose columns come from
drawn rules skips the prose-fill guard (a drawn grid is stronger evidence
than cell-width statistics). With no rules this is exactly detect_tables.
Extract the given 0-based pages of source into a fresh, self-contained
PDF containing only those pages (and their transitively referenced
objects). Pages appear in the order given.
Naïve sRGB → subtractive CMYK with maximum GCR (k = 1 − max(r,g,b)), the
exact inverse of cmyk_to_rgb_naive. Pure black/white map to
(0,0,0,1) / (0,0,0,0). Inputs clamped to 0.0..=1.0.
Search one page’s spans for query. Returns hits in top-to-bottom,
left-to-right order. Matches never cross line boundaries; whitespace in the
query matches both real spaces and inter-span word gaps.
Extract a page’s text in the document’s logical reading order, driven by
the Tagged-PDF structure tree (the order the producer intends, rather than the
geometric XY-cut of spans_to_text).