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

The page objects contained within a single PdfPage.

Content on a page 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.

Implementations§

Removes a single page object with the given source page object index from the given source PdfPage, adding the object to the end of this PdfPageObjects collection.

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

Likewise, if the given source PdfPage has a content regeneration strategy of PdfPageContentRegenerationStrategy::AutomaticOnEveryChange then content regeneration will be triggered on the source page.

Removes one or more page objects with the given range of indices from the given source PdfPage, adding the objects sequentially to the end of this PdfPageObjects collection.

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

Likewise, if the given source PdfPage has a content regeneration strategy of PdfPageContentRegenerationStrategy::AutomaticOnEveryChange then content regeneration will be triggered on the source page.

Moves all page objects in the given PdfPage into this PdfPageObjects collection, appending them to the end of this PdfPageObjects collection. The given PdfPage will be drained of all page objects once this operation is completed.

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

Likewise, if the given source PdfPage has a content regeneration strategy of PdfPageContentRegenerationStrategy::AutomaticOnEveryChange then content regeneration will be triggered on the source page.

Creates a new PdfPageGroupObject object group that includes any page objects in this PdfPageObjects collection matching the given predicate function.

Creates a new PdfPageGroupObject object group that can accept any PdfPageObject in this PdfPageObjects. The newly created group will be empty; you will need to manually add to it the objects you want to manipulate.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

Returns the total number of page objects in the collection.
Returns a single PdfPageObject from this page objects collection.
Returns an iterator over all the PdfPageObject objects in this page objects collection.
Adds the given PdfPageObject to this page objects collection. The object’s memory ownership will be transferred to the PdfPage containing this page objects collection, and the updated page object will be returned. Read more
Creates a new PdfPageTextObject at the given x and y page co-ordinates from the given arguments and adds it to this page objects collection, returning the text object wrapped inside a generic PdfPageObject wrapper. Read more
Creates a new PdfPagePathObject for the given line, with the given stroke settings applied. The new path object will be added to this page objects collection and then returned, wrapped inside a generic PdfPageObject wrapper. Read more
Creates a new PdfPagePathObject for the given cubic Bézier curve, with the given stroke settings applied. The new path object will be added to this page objects collection and then returned, wrapped inside a generic PdfPageObject wrapper. Read more
Creates a new PdfPagePathObject for the given rectangle, with the given fill and stroke settings applied. Both the stroke color and the stroke width must be provided for the rectangle to be stroked. The new path object will be added to this page objects collection and then returned, wrapped inside a generic PdfPageObject wrapper. Read more
Creates a new PdfPagePathObject. The new path will be created with a circle that fills the given rectangle, with the given fill and stroke settings applied. Both the stroke color and the stroke width must be provided for the circle to be stroked. The new path object will be added to this page objects collection and then returned, wrapped inside a generic PdfPageObject wrapper. Read more
Creates a new PdfPagePathObject. The new path will be created with a circle centered at the given coordinates, with the given radius, and with the given fill and stroke settings applied. Both the stroke color and the stroke width must be provided for the circle to be stroked. The new path object will be added to this page objects collection and then returned, wrapped inside a generic PdfPageObject wrapper. Read more
Creates a new PdfPagePathObject. The new path will be created with an ellipse that fills the given rectangle, with the given fill and stroke settings applied. Both the stroke color and the stroke width must be provided for the ellipse to be stroked. The new path object will be added to this page objects collection and then returned, wrapped inside a generic PdfPageObject wrapper. Read more
Creates a new PdfPagePathObject. The new path will be created with an ellipse centered at the given coordinates, with the given radii, and with the given fill and stroke settings applied. Both the stroke color and the stroke width must be provided for the ellipse to be stroked. The new path object will be added to this page objects collection and then returned, wrapped inside a generic PdfPageObject wrapper. Read more
Creates a new PdfPageImageObject at the given x and y page co-ordinates from the given arguments and adds it to this page objects collection, returning the image object wrapped inside a generic PdfPageObject wrapper. Read more
Removes the given PdfPageObject from this page objects collection. The object’s memory ownership will be removed from the 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 more
Removes the PdfPageObject at the given index from this page objects collection. The object’s memory ownership will be removed from the 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 more
Returns true if this page objects collection is empty.
Returns a Range from 0..(number of objects) for this page objects collection.
Returns an inclusive Range from 0..=(number of objects - 1) for this page objects collection.
Adds the given PdfPageTextObject to this page objects collection, returning the text object wrapped inside a generic PdfPageObject wrapper. Read more
Adds the given PdfPagePathObject to this page objects collection, returning the path object wrapped inside a generic PdfPageObject wrapper. Read more
Adds the given PdfPageImageObject to this page objects collection, returning the image object wrapped inside a generic PdfPageObject wrapper. Read more
The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.