-
-
Notifications
You must be signed in to change notification settings - Fork 579
Description
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/[email protected]/pkg/pdfcpu/validate/object.go:195 github.com/pdfcpu/pdfcpu/pkg/pdfcpu/validate.validateInfoDictDate /Users/elad/go/pkg/mod/github.com/pdfcpu/[email protected]/pkg/pdfcpu/validate/info.go:49 github.com/pdfcpu/pdfcpu/pkg/pdfcpu/validate.validateDocInfoDictEntry /Users/elad/go/pkg/mod/github.com/pdfcpu/[email protected]/pkg/pdfcpu/validate/info.go:132 github.com/pdfcpu/pdfcpu/pkg/pdfcpu/validate.validateDocumentInfoDict /Users/elad/go/pkg/mod/github.com/pdfcpu/[email protected]/pkg/pdfcpu/validate/info.go:157 github.com/pdfcpu/pdfcpu/pkg/pdfcpu/validate.validateDocumentInfoObject /Users/elad/go/pkg/mod/github.com/pdfcpu/[email protected]/pkg/pdfcpu/validate/info.go:185 github.com/pdfcpu/pdfcpu/pkg/pdfcpu/validate.XRefTable /Users/elad/go/pkg/mod/github.com/pdfcpu/[email protected]/pkg/pdfcpu/validate/xReftable.go:47 github.com/pdfcpu/pdfcpu/pkg/api.ValidateContext /Users/elad/go/pkg/mod/github.com/pdfcpu/[email protected]/pkg/api/api.go:80 github.com/pdfcpu/pdfcpu/pkg/api.PageCount /Users/elad/go/pkg/mod/github.com/pdfcpu/[email protected]/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/[email protected]/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