pub struct Annotation {Show 25 fields
pub annotation_type: String,
pub subtype: Option<String>,
pub subtype_enum: AnnotationSubtype,
pub contents: Option<String>,
pub rect: Option<[f64; 4]>,
pub author: Option<String>,
pub creation_date: Option<String>,
pub modification_date: Option<String>,
pub subject: Option<String>,
pub destination: Option<LinkDestination>,
pub action: Option<LinkAction>,
pub quad_points: Option<Vec<[f64; 8]>>,
pub color: Option<Vec<f64>>,
pub opacity: Option<f64>,
pub flags: AnnotationFlags,
pub border: Option<[f64; 3]>,
pub interior_color: Option<Vec<f64>>,
pub field_type: Option<WidgetFieldType>,
pub field_name: Option<String>,
pub field_value: Option<String>,
pub default_value: Option<String>,
pub field_flags: Option<u32>,
pub options: Option<Vec<String>>,
pub appearance_state: Option<String>,
pub raw_dict: Option<HashMap<String, Object>>,
}Expand description
A PDF annotation.
Represents all PDF annotation types per ISO 32000-1:2008, Section 12.5.
Fields§
§annotation_type: StringType of annotation (always “Annot” for annotations)
subtype: Option<String>Annotation subtype (Text, Highlight, Link, etc.)
subtype_enum: AnnotationSubtypeParsed annotation subtype enum
contents: Option<String>Text contents of the annotation
rect: Option<[f64; 4]>Rectangle bounds [x1, y1, x2, y2]
Author/creator of the annotation (T entry)
creation_date: Option<String>Creation date
modification_date: Option<String>Modification date (M entry)
subject: Option<String>Subject of the annotation
destination: Option<LinkDestination>Link destination (for Link annotations) PDF Spec: ISO 32000-1:2008, Section 12.3.2 - Destinations
action: Option<LinkAction>Link action (for Link annotations) PDF Spec: ISO 32000-1:2008, Section 12.6 - Actions
quad_points: Option<Vec<[f64; 8]>>QuadPoints for text markup annotations (Highlight, Underline, StrikeOut, Squiggly) Each quad is 8 values: x1,y1, x2,y2, x3,y3, x4,y4 PDF Spec: ISO 32000-1:2008, Section 12.5.6.10
color: Option<Vec<f64>>Color array (C entry) - RGB or other color space
opacity: Option<f64>Opacity (CA entry) - 0.0 to 1.0
flags: AnnotationFlagsAnnotation flags (F entry)
border: Option<[f64; 3]>Border style array (Border entry)
interior_color: Option<Vec<f64>>Interior color for closed shapes (IC entry)
field_type: Option<WidgetFieldType>Field type for Widget annotations (FT entry: Btn, Tx, Ch, Sig)
field_name: Option<String>Field name for Widget annotations (T entry) Note: This is different from author (also T entry) for other annotation types
field_value: Option<String>Field value for Widget annotations (V entry)
default_value: Option<String>Default value for Widget annotations (DV entry)
field_flags: Option<u32>Field flags for Widget annotations (Ff entry)
options: Option<Vec<String>>Options for choice fields (Opt entry)
appearance_state: Option<String>Appearance state for checkboxes/radios (AS entry)
raw_dict: Option<HashMap<String, Object>>Raw annotation dictionary for preserving unknown properties during round-trip.
This contains the complete original PDF dictionary, enabling faithful preservation of properties that aren’t explicitly parsed (appearance streams, popup references, vendor-specific extensions, etc.).