pub enum PdfError {
Show variants
EOF,
Parse {
source: Box<dyn Error + Send + Sync>,
},
Encoding {
source: Box<dyn Error + Send + Sync>,
},
Bounds {
index: usize,
len: usize,
},
UnexpectedLexeme {
pos: usize,
lexeme: String,
expected: &'static str,
},
UnknownType {
pos: usize,
first_lexeme: String,
rest: String,
},
UnknownVariant {
id: &'static str,
name: String,
},
NotFound {
word: String,
},
Reference,
XRefStreamType {
found: u64,
},
ContentReadPastBoundary,
HexDecode {
pos: usize,
bytes: [u8; 2],
},
Ascii85TailError,
IncorrectPredictorType {
n: u8,
},
FromPrimitive {
typ: &'static str,
field: &'static str,
source: Box<PdfError>,
},
MissingEntry {
typ: &'static str,
field: String,
},
KeyValueMismatch {
key: String,
value: String,
found: String,
},
WrongDictionaryType {
expected: String,
found: String,
},
FreeObject {
obj_nr: u64,
},
NullRef {
obj_nr: u64,
},
UnexpectedPrimitive {
expected: &'static str,
found: &'static str,
},
ObjStmOutOfBounds {
index: usize,
max: usize,
},
PageOutOfBounds {
page_nr: u32,
max: u32,
},
PageNotFound {
page_nr: u32,
},
UnspecifiedXRefEntry {
id: ObjNr,
},
InvalidPassword,
DecryptionFailure,
Jpeg {
source: Error,
},
Io {
source: Error,
},
Other {
msg: String,
},
NoneError {
file: &'static str,
line: u32,
column: u32,
},
Try {
file: &'static str,
line: u32,
column: u32,
source: Box<PdfError>,
},
TryContext {
file: &'static str,
line: u32,
column: u32,
context: Vec<(&'static str, String)>,
source: Box<PdfError>,
},
PostScriptParse,
PostScriptExec,
}