Skip to main content

parse_annotations

Function parse_annotations 

Source
pub fn parse_annotations(
    file: &PdfFile,
    page: &PdfPage,
    catalog: &Catalog,
    named: &HashMap<Vec<u8>, PdfObject>,
    acro_form: Option<&AcroForm>,
) -> Vec<Annotation>
Expand description

Parse a page’s annotations into renderable form. Unresolvable or appearance-less entries are kept (callers may want link rects later) but fail is_viewable. When an AcroForm is supplied, widget annotations gain a generated appearance where the producer left none. Link targets (/Dest / /A) are resolved to a Destination or URI via catalog and the document-wide named destination map (flattened once by the caller, so the name tree is never re-walked per page).