pub enum PdfPageObject<'a> {
    Text(PdfPageTextObject<'a>),
    Path(PdfPagePathObject<'a>),
    Image(PdfPageImageObject<'a>),
    Shading(PdfPageShadingObject<'a>),
    FormFragment(PdfPageFormFragmentObject<'a>),
    Unsupported(PdfPageUnsupportedObject<'a>),
}
Expand description

A single object on a PdfPage.

Variants

Text(PdfPageTextObject<'a>)

Path(PdfPagePathObject<'a>)

Image(PdfPageImageObject<'a>)

Shading(PdfPageShadingObject<'a>)

FormFragment(PdfPageFormFragmentObject<'a>)

Unsupported(PdfPageUnsupportedObject<'a>)

Common properties shared by all PdfPageObject types can still be accessed for page objects not recognized by Pdfium, but object-specific functionality will be unavailable.

Implementations

The object type of this PdfPageObject.

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.

Returns true if this PdfPageObject has an object type other than PdfPageObjectType::Unsupported.

The PdfPageObject::as_text_object(), PdfPageObject::as_path_object(), PdfPageObject::as_image_object(), PdfPageObject::as_shading_object(), and PdfPageObject::as_form_fragment_object() functions can be used to access properties and functions pertaining to a specific page object type.

Returns true if this PdfPageObject has an object type of PdfPageObjectType::Unsupported.

Common properties shared by all PdfPageObject types can still be accessed for page objects not recognized by Pdfium, but object-specific functionality will be unavailable.

Returns an immutable reference to the underlying PdfPageTextObject for this PdfPageObject, if this page object has an object type of PdfPageObjectType::Text.

Returns a mutable reference to the underlying PdfPageTextObject for this PdfPageObject, if this page object has an object type of PdfPageObjectType::Text.

Returns an immutable reference to the underlying PdfPagePathObject for this PdfPageObject, if this page object has an object type of PdfPageObjectType::Path.

Returns a mutable reference to the underlying PdfPagePathObject for this PdfPageObject, if this page object has an object type of PdfPageObjectType::Path.

Returns an immutable reference to the underlying PdfPageImageObject for this PdfPageObject, if this page object has an object type of PdfPageObjectType::Image.

Returns a mutable reference to the underlying PdfPageImageObject for this PdfPageObject, if this page object has an object type of PdfPageObjectType::Image.

Returns an immutable reference to the underlying PdfPageShadingObject for this PdfPageObject, if this page object has an object type of PdfPageObjectType::Shading.

Returns a mutable reference to the underlying PdfPageShadingObject for this PdfPageObject, if this page object has an object type of PdfPageObjectType::Shading.

Returns an immutable reference to the underlying PdfPageFormFragmentObject for this PdfPageObject, if this page object has an object type of PdfPageObjectType::FormFragment.

Returns a mutable reference to the underlying PdfPageFormFragmentObject for this PdfPageObject, if this page object has an object type of PdfPageObjectType::FormFragment.

Trait Implementations

Closes this PdfPageObject, releasing held memory.

Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.

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 true if this PdfPageObject contains transparency.
Returns the bounding box of this PdfPageObject. Read more
Applies the given transformation, expressed as six values representing the six configurable elements of a nine-element 3x3 PDF transformation matrix, to this PdfPageObject. Read more
Transforms this PdfPageObject by applying the transformation matrix read from the given PdfPageObject. Read more
Returns the current horizontal translation of the origin of this PdfPageObject.
Returns the current vertical translation of the origin of this PdfPageObject.
Returns the current horizontal scale factor applied to this PdfPageObject.
Returns the current vertical scale factor applied to this PdfPageObject.
Returns the counter-clockwise rotation applied to this PdfPageObject, in radians. Read more
Returns the current x axis skew applied to this PdfPageObject, in radians. Read more
Returns the current y axis skew applied to this PdfPageObject, in radians. Read more
Sets the blend mode that will be applied when painting this PdfPageObject. Read more
Returns the color of any filled paths in this PdfPageObject.
Sets the color of any filled paths in this PdfPageObject.
Returns the color of any stroked lines in this PdfPageObject.
Sets the color of any stroked lines in this PdfPageObject. Read more
Returns the width of any stroked lines in this PdfPageObject.
Sets the width of any stroked lines in this PdfPageObject. Read more
Returns the line join style that will be used when painting stroked path segments in this PdfPageObject. Read more
Sets the line join style that will be used when painting stroked path segments in this PdfPageObject. Read more
Returns the line cap style that will be used when painting stroked path segments in this PdfPageObject. Read more
Sets the line cap style that will be used when painting stroked path segments in this PdfPageObject. Read more
Returns the width of this PdfPageObject.
Returns the height of this PdfPageObject.
Returns true if the bounds of this PdfPageObject lie entirely within the given rectangle.
Returns true if the bounds of this PdfPageObject lie at least partially within the given rectangle. Read more
Moves the origin of this PdfPageObject by the given horizontal and vertical delta distances.
Returns the current horizontal and vertical translation of the origin of this PdfPageObject.
Changes the size of this PdfPageObject, scaling it by the given horizontal and vertical scale factors. Read more
Flips this PdfPageObject horizontally around its origin by applying a horizontal scale factor of -1.
Flips this PdfPageObject vertically around its origin by applying a vertical scale factor of -1.
Reflects this PdfPageObject by flipping it both horizontally and vertically around its origin.
Returns the current horizontal and vertical scale factors applied to this PdfPageObject.
Rotates this PdfPageObject counter-clockwise by the given number of degrees.
Returns the counter-clockwise rotation applied to this PdfPageObject, in degrees. Read more
Rotates this PdfPageObject clockwise by the given number of degrees.
Returns the clockwise rotation applied to this PdfPageObject, in degrees. Read more
Rotates this PdfPageObject counter-clockwise by the given number of radians.
Rotates this PdfPageObject clockwise by the given number of radians.
Returns the clockwise rotation applied to this PdfPageObject, in radians. Read more
Skews the axes of this PdfPageObject by the given angles in degrees.
Returns the current x axis and y axis skew angles applied to this PdfPageObject, in degrees. Read more
Returns the current x axis skew angle applied to this PdfPageObject, in degrees. Read more
Returns the current y axis skew applied to this PdfPageObject, in degrees. Read more
Skews the axes of this PdfPageObject by the given angles in radians.
Returns the current x axis and y axis skew angles applied to this PdfPageObject, in radians. 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.