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> !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<'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>
PdfPage containing this page objects
collection, and the updated page object will be returned. Read moresource§fn create_text_object(
&mut self,
x: PdfPoints,
y: PdfPoints,
text: impl ToString,
font: &PdfFont<'_>,
font_size: PdfPoints
) -> Result<PdfPageObject<'a>, PdfiumError>
fn create_text_object( &mut self, x: PdfPoints, y: PdfPoints, text: impl ToString, font: &PdfFont<'_>, 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>
PdfPage containing this page objects
collection, and the updated page object will be returned. It can be added back to a
page objects collection or dropped, at which point the memory owned by the object will
be freed. Read moresource§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>
PdfPage containing this page objects
collection, and the updated page object will be returned. It can be added back into a
page objects collection or discarded, at which point the memory owned by the object will
be freed. Read moresource§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.