pub struct Annotation {
pub source_page_index: usize,
pub rect: [f32; 4],
pub author: Option<String>,
pub modified: Option<String>,
pub flags: Option<u32>,
pub colour: Option<Vec<f32>>,
pub border: Option<Vec<f32>>,
pub kind: AnnotationKind,
}Expand description
One annotation to attach to a page.
Mirrors the round-26 reader’s crate::reader::PdfAnnotation shape
— the cross-subtype Table 164 fields hang off the struct, the
per-subtype payload off Self::kind.
Fields§
§source_page_index: usize0-based page index — which page the annotation lives on.
rect: [f32; 4]/Rect [llx lly urx ury] — annotation rectangle in default
user space (PDF coordinates, origin bottom-left).
/T — author / title-bar string. Most viewers display this in
the pop-up note’s title bar. Optional per Table 164.
modified: Option<String>/M — last-modified date string (raw PDF date form
D:YYYYMMDDHHmmSSOHH'mm' per §7.9.4). Caller is responsible
for the format — the writer passes it through verbatim.
flags: Option<u32>/F — annotation flag word (Table 167). Common values:
0 = no flags, 4 = Print (bit 3 set). When None, the writer
emits 4 (Print) so the annotation prints by default.
colour: Option<Vec<f32>>/C — colour. 0/1/3/4 numbers per §12.5.2:
[] = transparent, [g] = grey, [r g b] = RGB,
[c m y k] = CMYK. None ⇒ entry omitted.
border: Option<Vec<f32>>/Border [hradius vradius width] or [hr vr w dash]. When
None, defaults to [0 0 0] (no visible border).
kind: AnnotationKindPer-subtype payload.
Trait Implementations§
Source§impl Clone for Annotation
impl Clone for Annotation
Source§fn clone(&self) -> Annotation
fn clone(&self) -> Annotation
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more