Skip to content

pdfcpu val -v crashes on pdf that displays fine in chrome but crashes... #780

@joel-rieke

Description

@joel-rieke

Running the following:
pdfcpu val -v <redacted_pdf>

INFO: 2024/01/18 14:20:05 PDF Version 1.5 conforming reader
INFO: 2024/01/18 14:20:05 validating
STATS: 2024/01/18 14:20:05 XRefTable:


HeaderVersion: 1.6
has 1 pages
using object streams
using xref streams
is linearized file
XRefTable:
Size: 399
Root object: (296 0 R)
Info object: (294 0 R)

Stack trace ensues... with complaint about types.Integer -- which appears to be a standard type and maybe should be supported?

Fatal: pdfcpu: validateNameEntry: dict=StructElementDict entry=S invalid type types.Integer
github.com/pdfcpu/pdfcpu/pkg/pdfcpu/validate.validateNameEntry
/go/pkg/mod/github.com/pdfcpu/[email protected]/pkg/pdfcpu/validate/object.go:691
github.com/pdfcpu/pdfcpu/pkg/pdfcpu/validate.validateStructElementDictPart1
/go/pkg/mod/github.com/pdfcpu/[email protected]/pkg/pdfcpu/validate/structTree.go:354
github.com/pdfcpu/pdfcpu/pkg/pdfcpu/validate.validateStructElementDict
/go/pkg/mod/github.com/pdfcpu/[email protected]/pkg/pdfcpu/validate/structTree.go:459
github.com/pdfcpu/pdfcpu/pkg/pdfcpu/validate.validateStructTreeRootDictEntryKArray
/go/pkg/mod/github.com/pdfcpu/[email protected]/pkg/pdfcpu/validate/structTree.go:487
github.com/pdfcpu/pdfcpu/pkg/pdfcpu/validate.validateStructTreeRootDictEntryK
/go/pkg/mod/github.com/pdfcpu/[email protected]/pkg/pdfcpu/validate/structTree.go:533
github.com/pdfcpu/pdfcpu/pkg/pdfcpu/validate.validateStructTreeRootDict
/go/pkg/mod/github.com/pdfcpu/[email protected]/pkg/pdfcpu/validate/structTree.go:621
github.com/pdfcpu/pdfcpu/pkg/pdfcpu/validate.validateStructTree
/go/pkg/mod/github.com/pdfcpu/[email protected]/pkg/pdfcpu/validate/structTree.go:690
github.com/pdfcpu/pdfcpu/pkg/pdfcpu/validate.validateRootObject
/go/pkg/mod/github.com/pdfcpu/[email protected]/pkg/pdfcpu/validate/xReftable.go:921
github.com/pdfcpu/pdfcpu/pkg/pdfcpu/validate.XRefTable
/go/pkg/mod/github.com/pdfcpu/[email protected]/pkg/pdfcpu/validate/xReftable.go:44
github.com/pdfcpu/pdfcpu/pkg/api.ValidateContext
/go/pkg/mod/github.com/pdfcpu/[email protected]/pkg/api/api.go:80
github.com/pdfcpu/pdfcpu/pkg/api.Validate
/go/pkg/mod/github.com/pdfcpu/[email protected]/pkg/api/validate.go:55
github.com/pdfcpu/pdfcpu/pkg/api.ValidateFile
/go/pkg/mod/github.com/pdfcpu/[email protected]/pkg/api/validate.go:99
github.com/pdfcpu/pdfcpu/pkg/api.ValidateFiles
/go/pkg/mod/github.com/pdfcpu/[email protected]/pkg/api/validate.go:122
github.com/pdfcpu/pdfcpu/pkg/cli.Validate
/go/pkg/mod/github.com/pdfcpu/[email protected]/pkg/cli/cli.go:32
github.com/pdfcpu/pdfcpu/pkg/cli.Process
/go/pkg/mod/github.com/pdfcpu/[email protected]/pkg/cli/process.go:35
main.process
/go/pkg/mod/github.com/pdfcpu/[email protected]/cmd/pdfcpu/process.go:149
main.processValidateCommand
/go/pkg/mod/github.com/pdfcpu/[email protected]/cmd/pdfcpu/process.go:206
main.commandMap.process
/go/pkg/mod/github.com/pdfcpu/[email protected]/cmd/pdfcpu/cmd.go:143
main.main
/go/pkg/mod/github.com/pdfcpu/[email protected]/cmd/pdfcpu/main.go:56

The pdf may be found here:
https://kingcounty.gov/~/media/depts/records-licensing/recorders-office/documents/MLAPPpdf.ashx?la=en

Any ideas on how to fix would be appreciated.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions