pub enum PdfError {
Show 21 variants
Parse(ParseError),
CircularReference(ObjectId),
RecursionLimitExceeded,
UnknownObject(ObjectId),
NotAStream,
FilterChainTooLong,
ImageTooLarge,
StreamTooLarge,
CompressionBombDetected,
TooManyOperators,
EndstreamScanFailed,
InvalidHeader,
InvalidXref,
InvalidTrailer,
StreamDecodeError(String),
InvalidObjectStream,
InvalidObject(String),
InvalidPassword,
UnsupportedEncryption,
NotSupported(String),
Io(Error),
}Expand description
Top-level error type for rpdfium operations.
Variants§
Parse(ParseError)
A syntax-level parse error occurred.
CircularReference(ObjectId)
A circular reference was detected during object resolution.
RecursionLimitExceeded
The recursion limit was exceeded during object resolution or traversal.
UnknownObject(ObjectId)
The referenced object does not exist in the cross-reference table.
NotAStream
The object is not a stream when a stream was expected.
FilterChainTooLong
The decode filter chain exceeds the maximum allowed length.
ImageTooLarge
The image dimensions exceed the maximum allowed size.
StreamTooLarge
The decompressed stream size exceeds the maximum allowed size.
CompressionBombDetected
A decompression bomb was detected (compression ratio exceeds limit).
TooManyOperators
The number of content stream operators exceeds the maximum allowed.
EndstreamScanFailed
The endstream keyword could not be found within the scan distance.
InvalidHeader
The PDF file header is invalid.
InvalidXref
The cross-reference table is invalid.
InvalidTrailer
The PDF trailer is invalid.
StreamDecodeError(String)
A stream decode filter failed.
InvalidObjectStream
An object stream is malformed.
InvalidObject(String)
A PDF object is invalid or has an unexpected type.
InvalidPassword
The provided password is incorrect.
UnsupportedEncryption
The PDF uses an unsupported encryption scheme.
NotSupported(String)
The requested operation is not supported by rpdfium (excluded by design).
Io(Error)
An I/O error occurred.
Trait Implementations§
Source§impl Error for PdfError
impl Error for PdfError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()