Skip to main content

Crate pdf_annot

Crate pdf_annot 

Source
Expand description

PDF annotation engine.

Provides typed access to all annotation types defined in ISO 32000-2 §12.5, and annotation creation via the write feature (backed by lopdf).

Modules§

appearance_writer
Appearance stream generation for PDF annotations.
builder
Annotation builder for creating PDF annotations via lopdf.
error
Error types for annotation building.

Structs§

Annotation
A PDF annotation, wrapping the raw dictionary.
AnnotationFlags
Annotation flags (ISO 32000-2 Table 175).
AppearanceDict
Wrapper for an annotation’s /AP (appearance) dictionary.
BorderEffect
Border effect.
BorderStyle
Border style (ISO 32000-2 Table 168).
CaretAnnotation
A caret annotation (ISO 32000-2 §12.5.6.18).
FileAttachmentAnnotation
A FileAttachment annotation.
FreeTextAnnotation
A FreeText annotation.
InkAnnotation
An Ink (freehand drawing) annotation.
LineAnnotation
A line annotation (ISO 32000-2 §12.5.6.7).
LinkAnnotation
A link annotation (ISO 32000-2 §12.5.6.5).
MovieAnnotation
A Movie annotation.
PolygonAnnotation
A Polygon or PolyLine annotation.
PopupAnnotation
A popup annotation (ISO 32000-2 §12.5.6.14).
QuadPoints
Quadrilateral points for text markup annotations.
SoundAnnotation
A Sound annotation.
SquareCircleAnnotation
A Square or Circle annotation.
StampAnnotation
A Stamp annotation.
TextAnnotation
A text (sticky note) annotation.
TextMarkupAnnotation
A text markup annotation (Highlight, Underline, Squiggly, StrikeOut).

Enums§

Action
An action (ISO 32000-2 §12.6).
ActionType
Known PDF action types per ISO 32000-2 §12.6.4.
AnnotationType
The type of a PDF annotation (ISO 32000-2 Table 170).
BorderEffectStyle
Border effect style.
BorderStyleType
Border style types.
Color
A color value.
Destination
A PDF destination (ISO 32000-2 §12.3.2) — a target location and viewport recipe used by GoTo / GoToR actions and by direct /Dest link entries.
HighlightMode
Link highlight mode.
LineEnding
Line ending styles (ISO 32000-2 Table 179).
StampName
Standard rubber-stamp names per ISO 32000-2 Table 181.
TextMarkupType
The type of text markup.

Functions§

parse_destination
Parse a destination from an Object.
pdf_string_to_string
Convert a PDF string (possibly UTF-16BE with BOM) to a Rust String.