Skip to main content

Annotation

Enum Annotation 

Source
pub enum Annotation {
Show 19 variants Link(LinkAnnotation), TextMarkup(TextMarkupAnnotation), Text(TextAnnotation), FreeText(FreeTextAnnotation), Line(LineAnnotation), Shape(ShapeAnnotation), Polygon(PolygonAnnotation), Ink(InkAnnotation), Stamp(StampAnnotation), Popup(PopupAnnotation), Caret(CaretAnnotation), FileAttachment(FileAttachmentAnnotation), Redact(RedactAnnotation), Watermark(WatermarkAnnotation), Sound(SoundAnnotation), Movie(MovieAnnotation), Screen(ScreenAnnotation), ThreeD(ThreeDAnnotation), RichMedia(RichMediaAnnotation),
}
Expand description

Generic annotation wrapper for all annotation types.

This enum provides a unified interface for all PDF annotation types.

Variants§

Link annotation (hyperlinks, page navigation)

§

TextMarkup(TextMarkupAnnotation)

Text markup annotation (Highlight, Underline, StrikeOut, Squiggly)

§

Text(TextAnnotation)

Text annotation (sticky notes)

§

FreeText(FreeTextAnnotation)

FreeText annotation (text boxes displayed on page)

§

Line(LineAnnotation)

Line annotation

§

Shape(ShapeAnnotation)

Shape annotation (Square or Circle)

§

Polygon(PolygonAnnotation)

Polygon or PolyLine annotation

§

Ink(InkAnnotation)

Ink annotation (freehand drawing)

§

Stamp(StampAnnotation)

Stamp annotation (approval stamps, etc.)

§

Popup(PopupAnnotation)

Popup annotation (pop-up window for other annotations)

§

Caret(CaretAnnotation)

Caret annotation (text insertion markers)

§

FileAttachment(FileAttachmentAnnotation)

File attachment annotation

§

Redact(RedactAnnotation)

Redact annotation (marks content for removal)

§

Watermark(WatermarkAnnotation)

Watermark annotation (transparent text overlay)

§

Sound(SoundAnnotation)

Sound annotation (embedded audio)

§

Movie(MovieAnnotation)

Movie annotation (embedded video, legacy)

§

Screen(ScreenAnnotation)

Screen annotation (modern multimedia with renditions)

§

ThreeD(ThreeDAnnotation)

3D annotation (embedded 3D models)

§

RichMedia(RichMediaAnnotation)

RichMedia annotation (Flash, video players)

Implementations§

Source§

impl Annotation

Source

pub fn build(&self, page_refs: &[ObjectRef]) -> HashMap<String, Object>

Build the annotation dictionary.

Source

pub fn rect(&self) -> Rect

Get the bounding rectangle of this annotation.

Trait Implementations§

Source§

impl Clone for Annotation

Source§

fn clone(&self) -> Annotation

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Annotation

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<CaretAnnotation> for Annotation

Source§

fn from(caret: CaretAnnotation) -> Self

Converts to this type from the input type.
Source§

impl From<FileAttachmentAnnotation> for Annotation

Source§

fn from(file: FileAttachmentAnnotation) -> Self

Converts to this type from the input type.
Source§

impl From<FreeTextAnnotation> for Annotation

Source§

fn from(freetext: FreeTextAnnotation) -> Self

Converts to this type from the input type.
Source§

impl From<InkAnnotation> for Annotation

Source§

fn from(ink: InkAnnotation) -> Self

Converts to this type from the input type.
Source§

impl From<LineAnnotation> for Annotation

Source§

fn from(line: LineAnnotation) -> Self

Converts to this type from the input type.
Source§

impl From<LinkAnnotation> for Annotation

Source§

fn from(link: LinkAnnotation) -> Self

Converts to this type from the input type.
Source§

impl From<MovieAnnotation> for Annotation

Source§

fn from(movie: MovieAnnotation) -> Self

Converts to this type from the input type.
Source§

impl From<PolygonAnnotation> for Annotation

Source§

fn from(polygon: PolygonAnnotation) -> Self

Converts to this type from the input type.
Source§

impl From<PopupAnnotation> for Annotation

Source§

fn from(popup: PopupAnnotation) -> Self

Converts to this type from the input type.
Source§

impl From<RedactAnnotation> for Annotation

Source§

fn from(redact: RedactAnnotation) -> Self

Converts to this type from the input type.
Source§

impl From<RichMediaAnnotation> for Annotation

Source§

fn from(richmedia: RichMediaAnnotation) -> Self

Converts to this type from the input type.
Source§

impl From<ScreenAnnotation> for Annotation

Source§

fn from(screen: ScreenAnnotation) -> Self

Converts to this type from the input type.
Source§

impl From<ShapeAnnotation> for Annotation

Source§

fn from(shape: ShapeAnnotation) -> Self

Converts to this type from the input type.
Source§

impl From<SoundAnnotation> for Annotation

Source§

fn from(sound: SoundAnnotation) -> Self

Converts to this type from the input type.
Source§

impl From<StampAnnotation> for Annotation

Source§

fn from(stamp: StampAnnotation) -> Self

Converts to this type from the input type.
Source§

impl From<TextAnnotation> for Annotation

Source§

fn from(text: TextAnnotation) -> Self

Converts to this type from the input type.
Source§

impl From<TextMarkupAnnotation> for Annotation

Source§

fn from(markup: TextMarkupAnnotation) -> Self

Converts to this type from the input type.
Source§

impl From<ThreeDAnnotation> for Annotation

Source§

fn from(threed: ThreeDAnnotation) -> Self

Converts to this type from the input type.
Source§

impl From<WatermarkAnnotation> for Annotation

Source§

fn from(watermark: WatermarkAnnotation) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

Source§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

Source§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

Source§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<U, T> ToOwnedObj<U> for T
where U: FromObjRef<T>,

Source§

fn to_owned_obj(&self, data: FontData<'_>) -> U

Convert this type into T, using the provided data to resolve any offsets.
Source§

impl<U, T> ToOwnedTable<U> for T
where U: FromTableRef<T>,

Source§

fn to_owned_table(&self) -> U

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> Ungil for T
where T: Send,