pub struct PdfPageAnnotationObjects<'a> { /* private fields */ }Expand description
The page objects contained within a single PdfPageAnnotation.
Content in an annotation is structured as a stream of PdfPageObject objects of different types: text objects, image objects, path objects, and so on.
Note that Pdfium does not support or recognize all PDF page object types. For instance,
Pdfium does not currently support or recognize the External Object (“XObject”) page object type
supported by Adobe Acrobat and Foxit’s commercial PDF SDK. In these cases, Pdfium will return
PdfPageObjectType::Unsupported.
Page objects can be retrieved from any type of PdfPageAnnotation, but Pdfium currently
only permits adding new page objects to, or removing existing page objects from, annotations
of types PdfPageAnnotationType::Ink and PdfPageAnnotationType::Stamp. All other annotation
types are read-only.
Auto Trait Implementations§
impl<'a> Freeze for PdfPageAnnotationObjects<'a>
impl<'a> !RefUnwindSafe for PdfPageAnnotationObjects<'a>
impl<'a> !Send for PdfPageAnnotationObjects<'a>
impl<'a> !Sync for PdfPageAnnotationObjects<'a>
impl<'a> Unpin for PdfPageAnnotationObjects<'a>
impl<'a> !UnwindSafe for PdfPageAnnotationObjects<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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 moreSource§impl<'a, T> PdfPageObjectsCommon<'a> for Twhere
T: PdfPageObjectsPrivate<'a>,
impl<'a, T> PdfPageObjectsCommon<'a> for Twhere
T: PdfPageObjectsPrivate<'a>,
Source§fn get(&self, index: usize) -> Result<PdfPageObject<'a>, PdfiumError>
fn get(&self, index: usize) -> Result<PdfPageObject<'a>, PdfiumError>
Source§fn iter(&'a self) -> PdfPageObjectsIterator<'a> ⓘ
fn iter(&'a self) -> PdfPageObjectsIterator<'a> ⓘ
Source§fn add_object(
&mut self,
object: PdfPageObject<'a>,
) -> Result<PdfPageObject<'a>, PdfiumError>
fn add_object( &mut self, object: PdfPageObject<'a>, ) -> Result<PdfPageObject<'a>, PdfiumError>
Source§fn create_text_object(
&mut self,
x: PdfPoints,
y: PdfPoints,
text: impl ToString,
font: impl ToPdfFontToken,
font_size: PdfPoints,
) -> Result<PdfPageObject<'a>, PdfiumError>
fn create_text_object( &mut self, x: PdfPoints, y: PdfPoints, text: impl ToString, font: impl ToPdfFontToken, font_size: PdfPoints, ) -> Result<PdfPageObject<'a>, PdfiumError>
Source§fn create_path_object_line(
&mut self,
x1: PdfPoints,
y1: PdfPoints,
x2: PdfPoints,
y2: PdfPoints,
stroke_color: PdfColor,
stroke_width: PdfPoints,
) -> Result<PdfPageObject<'a>, PdfiumError>
fn create_path_object_line( &mut self, x1: PdfPoints, y1: PdfPoints, x2: PdfPoints, y2: PdfPoints, stroke_color: PdfColor, stroke_width: PdfPoints, ) -> Result<PdfPageObject<'a>, PdfiumError>
Source§fn create_path_object_bezier(
&mut self,
x1: PdfPoints,
y1: PdfPoints,
x2: PdfPoints,
y2: PdfPoints,
control1_x: PdfPoints,
control1_y: PdfPoints,
control2_x: PdfPoints,
control2_y: PdfPoints,
stroke_color: PdfColor,
stroke_width: PdfPoints,
) -> Result<PdfPageObject<'a>, PdfiumError>
fn create_path_object_bezier( &mut self, x1: PdfPoints, y1: PdfPoints, x2: PdfPoints, y2: PdfPoints, control1_x: PdfPoints, control1_y: PdfPoints, control2_x: PdfPoints, control2_y: PdfPoints, stroke_color: PdfColor, stroke_width: PdfPoints, ) -> Result<PdfPageObject<'a>, PdfiumError>
Source§fn create_path_object_rect(
&mut self,
rect: PdfRect,
stroke_color: Option<PdfColor>,
stroke_width: Option<PdfPoints>,
fill_color: Option<PdfColor>,
) -> Result<PdfPageObject<'a>, PdfiumError>
fn create_path_object_rect( &mut self, rect: PdfRect, stroke_color: Option<PdfColor>, stroke_width: Option<PdfPoints>, fill_color: Option<PdfColor>, ) -> Result<PdfPageObject<'a>, PdfiumError>
Source§fn create_path_object_circle(
&mut self,
rect: PdfRect,
stroke_color: Option<PdfColor>,
stroke_width: Option<PdfPoints>,
fill_color: Option<PdfColor>,
) -> Result<PdfPageObject<'a>, PdfiumError>
fn create_path_object_circle( &mut self, rect: PdfRect, stroke_color: Option<PdfColor>, stroke_width: Option<PdfPoints>, fill_color: Option<PdfColor>, ) -> Result<PdfPageObject<'a>, PdfiumError>
Source§fn create_path_object_circle_at(
&mut self,
center_x: PdfPoints,
center_y: PdfPoints,
radius: PdfPoints,
stroke_color: Option<PdfColor>,
stroke_width: Option<PdfPoints>,
fill_color: Option<PdfColor>,
) -> Result<PdfPageObject<'a>, PdfiumError>
fn create_path_object_circle_at( &mut self, center_x: PdfPoints, center_y: PdfPoints, radius: PdfPoints, stroke_color: Option<PdfColor>, stroke_width: Option<PdfPoints>, fill_color: Option<PdfColor>, ) -> Result<PdfPageObject<'a>, PdfiumError>
Source§fn create_path_object_ellipse(
&mut self,
rect: PdfRect,
stroke_color: Option<PdfColor>,
stroke_width: Option<PdfPoints>,
fill_color: Option<PdfColor>,
) -> Result<PdfPageObject<'a>, PdfiumError>
fn create_path_object_ellipse( &mut self, rect: PdfRect, stroke_color: Option<PdfColor>, stroke_width: Option<PdfPoints>, fill_color: Option<PdfColor>, ) -> Result<PdfPageObject<'a>, PdfiumError>
Source§fn create_path_object_ellipse_at(
&mut self,
center_x: PdfPoints,
center_y: PdfPoints,
x_radius: PdfPoints,
y_radius: PdfPoints,
stroke_color: Option<PdfColor>,
stroke_width: Option<PdfPoints>,
fill_color: Option<PdfColor>,
) -> Result<PdfPageObject<'a>, PdfiumError>
fn create_path_object_ellipse_at( &mut self, center_x: PdfPoints, center_y: PdfPoints, x_radius: PdfPoints, y_radius: PdfPoints, stroke_color: Option<PdfColor>, stroke_width: Option<PdfPoints>, fill_color: Option<PdfColor>, ) -> Result<PdfPageObject<'a>, PdfiumError>
Source§fn create_image_object(
&mut self,
x: PdfPoints,
y: PdfPoints,
image: &DynamicImage,
width: Option<PdfPoints>,
height: Option<PdfPoints>,
) -> Result<PdfPageObject<'a>, PdfiumError>
fn create_image_object( &mut self, x: PdfPoints, y: PdfPoints, image: &DynamicImage, width: Option<PdfPoints>, height: Option<PdfPoints>, ) -> Result<PdfPageObject<'a>, PdfiumError>
Source§fn remove_object(
&mut self,
object: PdfPageObject<'a>,
) -> Result<PdfPageObject<'a>, PdfiumError>
fn remove_object( &mut self, object: PdfPageObject<'a>, ) -> Result<PdfPageObject<'a>, PdfiumError>
Source§fn remove_object_at_index(
&mut self,
index: usize,
) -> Result<PdfPageObject<'a>, PdfiumError>
fn remove_object_at_index( &mut self, index: usize, ) -> Result<PdfPageObject<'a>, PdfiumError>
Source§fn as_range(&self) -> Range<PdfPageObjectIndex>
fn as_range(&self) -> Range<PdfPageObjectIndex>
0..(number of objects) for this page objects collection.Source§fn as_range_inclusive(&self) -> RangeInclusive<PdfPageObjectIndex>
fn as_range_inclusive(&self) -> RangeInclusive<PdfPageObjectIndex>
0..=(number of objects - 1) for this page objects collection.