pub struct Annotation {Show 24 fields
pub object: Option<ObjRef>,
pub subtype: String,
pub rect: Option<Rect>,
pub contents: Option<String>,
pub page: Option<ObjRef>,
pub name: Option<String>,
pub modified: Option<String>,
pub modified_date: Option<Date>,
pub flags: AnnotationFlags,
pub has_appearance: bool,
pub appearance_state: Option<String>,
pub border: Option<Border>,
pub color: Option<Vec<f32>>,
pub struct_parent: Option<i64>,
pub optional_content: Option<ObjRef>,
pub markup: Option<Markup>,
pub state: Option<AnnotationState>,
pub open: Option<bool>,
pub icon: Option<String>,
pub parent: Option<ObjRef>,
pub file: Option<FileSpec>,
pub destination: Option<Destination>,
pub action: Option<Action>,
pub additional_actions: Vec<TriggeredAction>,
}Expand description
One annotation of a page (ISO 32000-1 §12.5.2, Table 164), with the
entries of the subtypes pdfboss reads beyond the common ones: the
markup entries (§12.5.6.2), a reply’s state (§12.5.6.3), a text or
pop-up annotation’s open flag and icon, a link’s destination
(§12.5.6.5), an attachment’s file (§12.5.6.15), and the /A and /AA
actions (§12.6).
Fields§
§object: Option<ObjRef>The dictionary’s reference in the page’s /Annots; None for a
direct dictionary.
subtype: String/Subtype, as written.
rect: Option<Rect>/Rect, normalized; None when the entry is missing or malformed.
contents: Option<String>/Contents: the annotation’s text, or an alternate description.
page: Option<ObjRef>/P: the page the annotation belongs to, by reference.
name: Option<String>/NM: the name unique among the page’s annotations.
modified: Option<String>/M: when the annotation last changed, as written.
modified_date: Option<Date>/M parsed as a date (§7.9.4); None when it is in another format.
flags: AnnotationFlags/F, 0 when absent.
has_appearance: boolWhether an /AP dictionary with a normal appearance is present.
appearance_state: Option<String>/AS: the appearance state that picks the appearance stream.
border: Option<Border>/Border, as written; None when absent (the clause’s default is
[0 0 1]) or malformed.
color: Option<Vec<f32>>/C: the colour of the icon background, pop-up title bar or link
border, 0 (transparent), 1, 3 or 4 components as written.
struct_parent: Option<i64>/StructParent: the key under which the structure tree’s parent
tree lists the annotation (§14.7.4.4).
optional_content: Option<ObjRef>/OC: the optional content group or membership dictionary that
controls the annotation’s visibility, by reference.
markup: Option<Markup>The Table 170 entries; Some for the markup subtypes of Table 169.
state: Option<AnnotationState>The state a text annotation sets on the annotation it replies to;
Some when /StateModel or /State is present.
open: Option<bool>/Open of a text or pop-up annotation.
icon: Option<String>/Name: the icon an annotation shows without an appearance stream,
as written; text, file attachment and sound annotations name one.
parent: Option<ObjRef>/Parent: the markup annotation a pop-up belongs to, by reference.
file: Option<FileSpec>/FS: the file a file attachment annotation carries.
destination: Option<Destination>A link’s /Dest, explicit or looked up by name.
action: Option<Action>/A: the action performed when the annotation is activated, with
its /Next chain.
additional_actions: Vec<TriggeredAction>/AA: the actions the annotation’s trigger events fire, in the
order of Tables 194 and 196.