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 the underlying PdfPageTextObject for this PdfPageObject, if this page object has an object type of PdfPageObjectType::Text.

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

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

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

Returns 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.

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.

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

Sets the blend mode that will be applied when painting this PdfPageObject.

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.

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 join 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.

Changes the size of this PdfPageObject, scaling it by the given horizontal and vertical scale factors. Read more

Rotates this PdfPageObject counter-clockwise by the given number of degrees.

Rotates this PdfPageObject clockwise by the given number of degrees.

Rotates this PdfPageObject counter-clockwise by the given number of radians.

Rotates this PdfPageObject clockwise by the given number of radians.

Skews the axes of this PdfPageObject by the given angles in degrees.

Skews the axes of this PdfPageObject by the given angles in radians.

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.