pub struct PdfPageAnnotations<'a> { /* private fields */ }
Expand description

The annotations that have been added to a single PdfPage.

Implementations§

source§

impl<'a> PdfPageAnnotations<'a>

source

pub fn bindings(&self) -> &'a dyn PdfiumLibraryBindings

Returns the PdfiumLibraryBindings used by this PdfPageAnnotations collection.

source

pub fn len(&self) -> PdfPageAnnotationIndex

Returns the total number of annotations that have been added to the containing PdfPage.

source

pub fn is_empty(&self) -> bool

Returns true if this PdfPageAnnotations collection is empty.

source

pub fn as_range(&self) -> Range<PdfPageAnnotationIndex>

Returns a Range from 0..(number of annotations) for this PdfPageAnnotations collection.

source

pub fn get( &self, index: PdfPageAnnotationIndex ) -> Result<PdfPageAnnotation<'a>, PdfiumError>

Returns a single PdfPageAnnotation from this PdfPageAnnotations collection.

source

pub fn first(&self) -> Result<PdfPageAnnotation<'a>, PdfiumError>

Returns the first PdfPageAnnotation in this PdfPageAnnotations collection.

source

pub fn last(&self) -> Result<PdfPageAnnotation<'a>, PdfiumError>

Returns the last PdfPageAnnotation in this PdfPageAnnotations collection.

source

pub fn iter(&self) -> PdfPageAnnotationsIterator<'_>

Returns an iterator over all the annotations in this PdfPageAnnotations collection.

source

pub fn create_free_text_annotation( &mut self, text: &str ) -> Result<PdfPageFreeTextAnnotation<'a>, PdfiumError>

Creates a new PdfPageFreeTextAnnotation containing the given text in this PdfPageAnnotations collection, returning the newly created annotation.

If the containing PdfPage has a content regeneration strategy of PdfPageContentRegenerationStrategy::AutomaticOnEveryChange then content regeneration will be triggered on the page.

source

pub fn create_highlight_annotation( &mut self ) -> Result<PdfPageHighlightAnnotation<'a>, PdfiumError>

Creates a new PdfPageHighlightAnnotation annotation in this PdfPageAnnotations collection, returning the newly created annotation.

If the containing PdfPage has a content regeneration strategy of PdfPageContentRegenerationStrategy::AutomaticOnEveryChange then content regeneration will be triggered on the page.

source

pub fn create_ink_annotation( &mut self ) -> Result<PdfPageInkAnnotation<'a>, PdfiumError>

Creates a new PdfPageInkAnnotation in this PdfPageAnnotations collection, returning the newly created annotation.

If the containing PdfPage has a content regeneration strategy of PdfPageContentRegenerationStrategy::AutomaticOnEveryChange then content regeneration will be triggered on the page.

Creates a new PdfPageLinkAnnotation with the given URI in this PdfPageAnnotations collection, returning the newly created annotation.

If the containing PdfPage has a content regeneration strategy of PdfPageContentRegenerationStrategy::AutomaticOnEveryChange then content regeneration will be triggered on the page.

source

pub fn create_popup_annotation( &mut self ) -> Result<PdfPagePopupAnnotation<'a>, PdfiumError>

Creates a new PdfPagePopupAnnotation annotation in this PdfPageAnnotations collection, returning the newly created annotation.

If the containing PdfPage has a content regeneration strategy of PdfPageContentRegenerationStrategy::AutomaticOnEveryChange then content regeneration will be triggered on the page.

source

pub fn create_square_annotation( &mut self ) -> Result<PdfPageSquareAnnotation<'a>, PdfiumError>

Creates a new PdfPageSquareAnnotation annotation in this PdfPageAnnotations collection, returning the newly created annotation.

If the containing PdfPage has a content regeneration strategy of PdfPageContentRegenerationStrategy::AutomaticOnEveryChange then content regeneration will be triggered on the page.

source

pub fn create_squiggly_annotation( &mut self ) -> Result<PdfPageSquigglyAnnotation<'a>, PdfiumError>

Creates a new PdfPageSquigglyAnnotation annotation in this PdfPageAnnotations collection, returning the newly created annotation.

If the containing PdfPage has a content regeneration strategy of PdfPageContentRegenerationStrategy::AutomaticOnEveryChange then content regeneration will be triggered on the page.

source

pub fn create_stamp_annotation( &mut self ) -> Result<PdfPageStampAnnotation<'a>, PdfiumError>

Creates a new PdfPageStampAnnotation annotation in this PdfPageAnnotations collection, returning the newly created annotation.

If the containing PdfPage has a content regeneration strategy of PdfPageContentRegenerationStrategy::AutomaticOnEveryChange then content regeneration will be triggered on the page.

source

pub fn create_strikeout_annotation( &mut self ) -> Result<PdfPageStrikeoutAnnotation<'a>, PdfiumError>

Creates a new PdfPageStrikeoutAnnotation annotation in this PdfPageAnnotations collection, returning the newly created annotation.

If the containing PdfPage has a content regeneration strategy of PdfPageContentRegenerationStrategy::AutomaticOnEveryChange then content regeneration will be triggered on the page.

source

pub fn create_text_annotation( &mut self, text: &str ) -> Result<PdfPageTextAnnotation<'a>, PdfiumError>

Creates a new PdfPageTextAnnotation containing the given text in this PdfPageAnnotations collection, returning the newly created annotation.

If the containing PdfPage has a content regeneration strategy of PdfPageContentRegenerationStrategy::AutomaticOnEveryChange then content regeneration will be triggered on the page.

source

pub fn create_underline_annotation( &mut self ) -> Result<PdfPageUnderlineAnnotation<'a>, PdfiumError>

Creates a new PdfPageUnderlineAnnotation annotation in this PdfPageAnnotations collection, returning the newly created annotation.

If the containing PdfPage has a content regeneration strategy of PdfPageContentRegenerationStrategy::AutomaticOnEveryChange then content regeneration will be triggered on the page.

source

pub fn create_squiggly_annotation_under_object( &mut self, object: &PdfPageObject<'_>, color: PdfColor, contents: Option<&str> ) -> Result<PdfPageSquigglyAnnotation<'a>, PdfiumError>

Creates a new PdfPageSquigglyAnnotation annotation and positions it underneath the given PdfPageObject, coloring it with the given PdfColor.

If the given contents string is supplied, the annotation will be additionally configured so that when the given PdfPageObject is clicked in a conforming PDF viewer, the given contents string will be displayed in a popup window.

If the containing PdfPage has a content regeneration strategy of PdfPageContentRegenerationStrategy::AutomaticOnEveryChange then content regeneration will be triggered on the page.

source

pub fn create_underline_annotation_under_object( &mut self, object: &PdfPageObject<'_>, color: PdfColor, contents: Option<&str> ) -> Result<PdfPageUnderlineAnnotation<'a>, PdfiumError>

Creates a new PdfPageUnderlineAnnotation annotation and positions it underneath the given PdfPageObject, coloring it with the given PdfColor.

If the given contents string is supplied, the annotation will be additionally configured so that when the given PdfPageObject is clicked in a conforming PDF viewer, the given contents string will be displayed in a popup window.

If the containing PdfPage has a content regeneration strategy of PdfPageContentRegenerationStrategy::AutomaticOnEveryChange then content regeneration will be triggered on the page.

source

pub fn create_strikeout_annotation_through_object( &mut self, object: &PdfPageObject<'_>, color: PdfColor, contents: Option<&str> ) -> Result<PdfPageStrikeoutAnnotation<'a>, PdfiumError>

Creates a new PdfPageStrikeoutAnnotation annotation and vertically positions it in the center the given PdfPageObject, coloring it with the given PdfColor.

If the given contents string is supplied, the annotation will be additionally configured so that when the given PdfPageObject is clicked in a conforming PDF viewer, the given contents string will be displayed in a popup window.

If the containing PdfPage has a content regeneration strategy of PdfPageContentRegenerationStrategy::AutomaticOnEveryChange then content regeneration will be triggered on the page.

source

pub fn create_highlight_annotation_over_object( &mut self, object: &PdfPageObject<'_>, color: PdfColor, contents: Option<&str> ) -> Result<PdfPageHighlightAnnotation<'a>, PdfiumError>

Creates a new PdfPageHighlightAnnotation annotation and positions it so as to cover the given PdfPageObject, coloring it with the given PdfColor.

If the given contents string is supplied, the annotation will be additionally configured so that when the given PdfPageObject is clicked in a conforming PDF viewer, the given contents string will be displayed in a popup window.

If the containing PdfPage has a content regeneration strategy of PdfPageContentRegenerationStrategy::AutomaticOnEveryChange then content regeneration will be triggered on the page.

source

pub fn delete_annotation( &mut self, annotation: PdfPageAnnotation<'a> ) -> Result<(), PdfiumError>

Removes the given PdfPageAnnotation from this PdfPageAnnotations collection, consuming the PdfPageAnnotation.

If the containing PdfPage has a content regeneration strategy of PdfPageContentRegenerationStrategy::AutomaticOnEveryChange then content regeneration will be triggered on the page.

Auto Trait Implementations§

§

impl<'a> !RefUnwindSafe for PdfPageAnnotations<'a>

§

impl<'a> !Send for PdfPageAnnotations<'a>

§

impl<'a> !Sync for PdfPageAnnotations<'a>

§

impl<'a> Unpin for PdfPageAnnotations<'a>

§

impl<'a> !UnwindSafe for PdfPageAnnotations<'a>

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. 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 Twhere 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.

§

impl<T> Pointable for T

§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
§

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

Initializes a with the given initializer. Read more
§

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

Dereferences the given pointer. Read more
§

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

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

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

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

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

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

§

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.