pub enum PdfiumError {
Show 41 variants LoadLibraryError(Error), UnrecognizedPath, PageIndexOutOfBounds, UnknownBitmapFormat, UnknownBitmapRotation, UnknownFormType, UnknownFormFieldType, UnknownActionType, PageObjectIndexOutOfBounds, PageObjectNotAttachedToPage, PageObjectAlreadyAttachedToDifferentPage, PageAnnotationIndexOutOfBounds, PageFlattenFailure, PageMissingEmbeddedThumbnail, UnknownPdfPageObjectType, UnknownPdfPageTextRenderMode, UnknownPdfPagePathFillMode, UnknownPdfAnnotationType, UnknownPdfSecurityHandlerRevision, UnsupportedPdfPageObjectType, TextSegmentIndexOutOfBounds, CharIndexOutOfBounds, NoCharsInPageObject, NoCharsInAnnotation, NoCharsInRect, ImageObjectFilterIndexOutOfBounds, ImageObjectFilterIndexInBoundsButFilterUndefined, UnknownPdfColorSpace, InvalidTransformationMatrix, SignatureIndexOutOfBounds, AttachmentIndexOutOfBounds, NoDataInAttachment, DataBufferLengthMismatch, EmptyPageObjectGroup, PdfiumFunctionReturnValueIndicatedFailure, UnableToConvertPdfiumColorValueToRustu8(TryFromIntError), WebSysWindowObjectNotAvailable, ImageError, ImageSizeOutOfBounds, IoError(Error), PdfiumLibraryInternalError(PdfiumInternalError),
}

Variants

LoadLibraryError(Error)

The external Pdfium library could not be loaded.

UnrecognizedPath

PageIndexOutOfBounds

UnknownBitmapFormat

UnknownBitmapRotation

UnknownFormType

UnknownFormFieldType

UnknownActionType

PageObjectIndexOutOfBounds

PageObjectNotAttachedToPage

PageObjectAlreadyAttachedToDifferentPage

PageAnnotationIndexOutOfBounds

PageFlattenFailure

PageMissingEmbeddedThumbnail

UnknownPdfPageObjectType

UnknownPdfPageTextRenderMode

UnknownPdfPagePathFillMode

UnknownPdfAnnotationType

UnknownPdfSecurityHandlerRevision

UnsupportedPdfPageObjectType

TextSegmentIndexOutOfBounds

CharIndexOutOfBounds

NoCharsInPageObject

NoCharsInAnnotation

NoCharsInRect

ImageObjectFilterIndexOutOfBounds

ImageObjectFilterIndexInBoundsButFilterUndefined

UnknownPdfColorSpace

InvalidTransformationMatrix

SignatureIndexOutOfBounds

AttachmentIndexOutOfBounds

NoDataInAttachment

DataBufferLengthMismatch

Two data buffers are expected to have the same size, but they do not.

EmptyPageObjectGroup

The setting cannot be returned because this PdfPageGroupObject is empty.

PdfiumFunctionReturnValueIndicatedFailure

A call to a internal Pdfium FPDF_* function returned a value indicating failure.

For Pdfium functions that return enumerations, this means the function returned a value of -1 rather than a valid enumeration constant.

For Pdfium functions that return C-style boolean integers, this means that the function returned a value other than PdfiumLibraryBindings::TRUE.

UnableToConvertPdfiumColorValueToRustu8(TryFromIntError)

A call to a Pdfium function that returns a standard 8-bit color component value (for example, FPDFPageObj_GetStrokeColor() and FPDFPageObj_GetStrokeColor()) successfully returned a value, but the value could not be converted from a c_int to a standard Rust u8.

WebSysWindowObjectNotAvailable

The browser’s built-in Window object could not be retrieved.

ImageError

An error occurred during an image processing operation.

ImageSizeOutOfBounds

Dimensions of Image::Image are specified in u32, but bitmaps in Pdfium are sized in c_int (i32), meaning that an Image::Image can have dimensions that overflow the maximum size of a Pdfium bitmap. As a compromise, Image dimensions in pdfium-render are limited to u16.

This error indicates that an Image::Image had a width or height larger than the maximum u16 size allowed by pdfium-render.

IoError(Error)

An I/O error occurred during a Pdfium file operation.

PdfiumLibraryInternalError(PdfiumInternalError)

A wrapped internal library error from Pdfium’s FPDF_ERR_* constant values.

Trait Implementations

Formats the value using the given formatter. Read more

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.

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.