Nothing Special   »   [go: up one dir, main page]

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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pdfcpu: invalid date #710

Closed
eladb2011 opened this issue Sep 13, 2023 · 3 comments
Closed

pdfcpu: invalid date #710

eladb2011 opened this issue Sep 13, 2023 · 3 comments
Assignees

Comments

@eladb2011
Copy link

Hi @hhrutter

We're facing an issue where pdf validation is unsuccessful due to the following validation error pdfcpu: validateDateObject: <D:20230912144809Z'0> invalid date

We're able to open / view files with such date format.
It fails specifically when calling api.PageCount(...) function.

Here is the full error trace:

Error: Received unexpected error: pdfcpu: validateDateObject: <D:20230912144809Z'0> invalid date github.com/pdfcpu/pdfcpu/pkg/pdfcpu/validate.validateDateObject /Users/elad/go/pkg/mod/github.com/pdfcpu/pdfcpu@v0.5.0/pkg/pdfcpu/validate/object.go:195 github.com/pdfcpu/pdfcpu/pkg/pdfcpu/validate.validateInfoDictDate /Users/elad/go/pkg/mod/github.com/pdfcpu/pdfcpu@v0.5.0/pkg/pdfcpu/validate/info.go:49 github.com/pdfcpu/pdfcpu/pkg/pdfcpu/validate.validateDocInfoDictEntry /Users/elad/go/pkg/mod/github.com/pdfcpu/pdfcpu@v0.5.0/pkg/pdfcpu/validate/info.go:132 github.com/pdfcpu/pdfcpu/pkg/pdfcpu/validate.validateDocumentInfoDict /Users/elad/go/pkg/mod/github.com/pdfcpu/pdfcpu@v0.5.0/pkg/pdfcpu/validate/info.go:157 github.com/pdfcpu/pdfcpu/pkg/pdfcpu/validate.validateDocumentInfoObject /Users/elad/go/pkg/mod/github.com/pdfcpu/pdfcpu@v0.5.0/pkg/pdfcpu/validate/info.go:185 github.com/pdfcpu/pdfcpu/pkg/pdfcpu/validate.XRefTable /Users/elad/go/pkg/mod/github.com/pdfcpu/pdfcpu@v0.5.0/pkg/pdfcpu/validate/xReftable.go:47 github.com/pdfcpu/pdfcpu/pkg/api.ValidateContext /Users/elad/go/pkg/mod/github.com/pdfcpu/pdfcpu@v0.5.0/pkg/api/api.go:80 github.com/pdfcpu/pdfcpu/pkg/api.PageCount /Users/elad/go/pkg/mod/github.com/pdfcpu/pdfcpu@v0.5.0/pkg/api/page.go:225 github.com/anchor-g/mono/go/common/pdf.(*PdfCpuProcessor).AddAnchorWatermark /Users/elad/dev/mono/go/common/pdf/pdf-processor.go:28 github.com/anchor-g/mono/go/common/pdf.(*PdfTestContext).SubTestAddWatermarkWithPdfCpu /Users/elad/dev/mono/go/common/pdf/add-image-to-pdf-learning_test.go:44 reflect.Value.call /Users/elad/go/go1.20.5/src/reflect/value.go:586 reflect.Value.Call /Users/elad/go/go1.20.5/src/reflect/value.go:370 github.com/houqp/gtest.RunSubTests.func1 /Users/elad/go/pkg/mod/github.com/houqp/gtest@v1.0.0/gtest.go:307 testing.tRunner /Users/elad/go/go1.20.5/src/testing/testing.go:1576 runtime.goexit /Users/elad/go/go1.20.5/src/runtime/asm_arm64.s:1172 Test: TestPdf --- FAIL: TestPdf (0.00s)

Thank you!
Elad

@hhrutter hhrutter changed the title pdfcpu: validateDateObject: <D:20230912144809Z'0> invalid date pdfcpu: invalid date Sep 13, 2023
@hhrutter
Copy link
Collaborator

This is fixed with the latest commit!

@eladb2011
Copy link
Author

Thanks @hhrutter fro the quick response and handling!
I will wait to the next version release 🙏

@hhrutter
Copy link
Collaborator

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

No branches or pull requests

2 participants