pub struct AnnotationRecord {
pub page: u32,
pub rect: [f64; 4],
pub color: Option<[f64; 3]>,
pub border: Option<Border>,
pub title: Option<String>,
pub contents: Option<String>,
pub subtype: AnnotationSubtype,
}Expand description
One /ANN entry. Each record contributes a single annotation
(/Annot) to one page’s /Annots array. page is 1-based; 0 is
reserved for “no explicit page” (the writer substitutes the page
being assembled at the time the record fired).
Fields§
§page: u32Page the annotation lives on (1-based). Set by the operator: an
explicit /Page (or /SrcPg alias) wins; otherwise the writer
falls back to current_page + 1 from
DocumentStructure::current_page.
rect: [f64; 4]/Rect [llx lly urx ury] — default user-space bounds. Required
per PDF spec; defaulted to the empty rect on malformed input so
the annotation at least has somewhere to land.
color: Option<[f64; 3]>Optional /Color triple in [0, 1] (PDF /C entry).
border: Option<Border>Optional border specification. Translates to /Border on output.
title: Option<String>Optional /Title (annotator name) — meaningful for /Text and
/FreeText.
contents: Option<String>Optional /Contents — meaningful for /Text and /FreeText;
also accepted as a tooltip on /Link.
subtype: AnnotationSubtypeSubtype-specific payload.
Trait Implementations§
Source§impl Clone for AnnotationRecord
impl Clone for AnnotationRecord
Source§fn clone(&self) -> AnnotationRecord
fn clone(&self) -> AnnotationRecord
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more