Skip to main content

flatten_annotations

Function flatten_annotations 

Source
pub fn flatten_annotations(doc: &mut Document) -> Result<(), AnnotBuildError>
Expand description

Flatten all non-widget, non-link annotations on all pages.

Reference integrity: when a markup annotation is flattened, its associated /Popup companion annotation is removed as well, so no /Parent reference is left dangling. Cross-annotation /IRT (reply threads) and structure-tree OBJR references that point at a flattened annotation are NOT rewritten; per ISO 32000-1 §7.3.10 a reference to a removed object resolves to the null object, which conforming readers tolerate. Rewriting those references is intentionally out of scope (tracked as a follow-up).