Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

date validation #366

Closed
nhannh23 opened this issue Aug 6, 2021 · 4 comments
Closed

date validation #366

nhannh23 opened this issue Aug 6, 2021 · 4 comments
Assignees

Comments

@nhannh23
Copy link

nhannh23 commented Aug 6, 2021

Hi @hhrutter
Thanks for the great tool. Please help me with this issue. 馃檹
I'm having a problem while validating one of my pdf files. When I run pdfcpu validate file_name.pdf, it produces like below

validating(mode=relaxed) file_name.pdf ...
validation error (obj#:6): pdfcpu: validateDateObject: <D:20210730163356+09'00'> invalid date

At first, I tested your code with this string D:20210730163356+09'00', and the result was fine. There is no problem.
However, when I take a look at the error message in my terminal, it showed like this:

pdfcpu: validateDateObject: \u003cD:20210730163459+09'00'\u0000\u003e invalid date

In my understanding, \u003c represents <, and \u003e is >. In the log, there is an additional \u0000 which is a Null Unicode character. I guess this is the cause, which breaks this condition.

Please take a look at this matter. I can provide you the sample file via Slack DM.
Thanks in advance.

@hhrutter
Copy link
Collaborator

hhrutter commented Aug 6, 2021

Yes please go ahead and send me your file for analysis.

@hhrutter hhrutter changed the title pdfcpu: validateDateObject: <D:20210730163459+09'00'> invalid date date validation Aug 6, 2021
@hhrutter hhrutter self-assigned this Aug 6, 2021
@nhannh23
Copy link
Author

nhannh23 commented Aug 7, 2021

I sent you the file. Thanks for your investigation.

@hhrutter
Copy link
Collaborator

hhrutter commented Aug 8, 2021

This is fixed with the latest commit.

@nhannh23
Copy link
Author

nhannh23 commented Aug 9, 2021

Awesome.
Thank you very much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants