-
Notifications
You must be signed in to change notification settings - Fork 123
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
Panics with invalid date #213
Comments
It returns an Error which is correct, because this is not a valid PDF file.
|
Just encountered this today. While it's true that it's not standard, it's also rather common in the wild. I checked with bank statement PDFs from four different banks and pdf-rs panicked on the date on every one. Is it out-of-scope of this project to make the parser more lenient? (Generation can be strict to the standard, sure). |
Reviewing this again but it shouldn't be panicking for incorrect dates. |
@yutotakano You are welcome to make a PR that changes the behavior to a simple String wrapper with a function to try and extract the date. |
Attached is a reproducible test case with it panicking within the following method:
With the following date:
Ideally it shouldn't bail if there is an invalid date but maybe render a blank string.
The text was updated successfully, but these errors were encountered: