pub enum PdfReadError {
NotAPdf,
StartxrefNotFound,
MalformedXref,
MalformedTrailer,
XrefStreamNotSupported,
UnresolvableObject(u32),
MalformedPageTree,
Io(String),
}Expand description
Errors that can occur when reading a PDF file.
Variants§
NotAPdf
The bytes do not start with a valid %PDF- header.
StartxrefNotFound
The startxref keyword or its offset could not be found.
MalformedXref
The cross-reference table is missing or could not be parsed.
MalformedTrailer
The trailer dictionary is missing or malformed.
XrefStreamNotSupported
The PDF uses a cross-reference stream (PDF 1.5+), which is not yet supported.
UnresolvableObject(u32)
An object reference could not be resolved (offset out of range or malformed).
MalformedPageTree
The page tree structure is invalid (missing /Count or /Pages).
Io(String)
An I/O error occurred while opening a file.
Trait Implementations§
Source§impl Debug for PdfReadError
impl Debug for PdfReadError
Source§impl Display for PdfReadError
impl Display for PdfReadError
Source§impl Error for PdfReadError
impl Error for PdfReadError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<Error> for PdfReadError
impl From<Error> for PdfReadError
Source§impl PartialEq for PdfReadError
impl PartialEq for PdfReadError
impl StructuralPartialEq for PdfReadError
Auto Trait Implementations§
impl Freeze for PdfReadError
impl RefUnwindSafe for PdfReadError
impl Send for PdfReadError
impl Sync for PdfReadError
impl Unpin for PdfReadError
impl UnsafeUnpin for PdfReadError
impl UnwindSafe for PdfReadError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more