-
Notifications
You must be signed in to change notification settings - Fork 185
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add relaxed mode (ignores things like false byte offsets in xref table) #41
Comments
The startxref value is wrong in this file, should be 267985. |
Locally on my hard disk I have more pdf documents showing this error. So, what to do? Perhaps lopdf should have a relaxed mode when parsing where such things will be accepted? |
It is little annoying that it prints these things into stdout with no possibility to turn this off even in release mode. Custom { kind: InvalidData, error: StringError("Not a valid PDF file (read object at 37958).\nMismatch { message: "expect repeat at least 1 times, found 0 times", position: 37958 }") } Yes this pdf is not 100% correct as references to some objects points at one character before actual object at newline character, but pdf viewers learned to forgive these things. At least would be better to use rust logging for these things like: Err(err) => {
warn!("{:?}", err); // or error!
} |
I vote to make the error logging configurable and a relaxed parsing mode. |
|
Found another error for http://mirrors.ibiblio.org/CTAN/macros/latex/contrib/ksp-thesis/ksp-thesis.pdf which gives:
Custom { kind: InvalidData, error: StringError("Not a valid PDF file (xref_and_trailer).\nMismatch { message: "expect repeat at least 1 times, found 0 times", position: 267986 }") }
The text was updated successfully, but these errors were encountered: