pdfcpu / pdfcpu

A PDF processor written in Go.

Home Page:http://pdfcpu.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

validateDestinationArray: second element must be a name 97 (1)

wingjson opened this issue · comments

  • Version v0.7.0
  • OS version windows11

Hello,when i tried to use RemoveBookmarksFile,report pdfcpu: validateDestinationArray: second element must be a name 97 (1)
below is my code:
conf := model.NewDefaultConfiguration()
respdf := api.RemoveBookmarksFile("2.pdf", "1.pdf", conf)

also when i tried to decrypt this file,report Read: xRefTable failed: strconv.Atoi: parsing "4294967252": value out of range,but qpdf can decrypt.
2.pdf

Thank you for reporting this.

Which file gives you the decrypt error?
Can you share the file or at least post a stacktrace?
2.pdf already fails during validation because of the invalid destination, so this must be a different file.

It's also 2.pdf.it have some permissions and I want to remove them.But qpdf --decrypt can success

👍🏻 thanks for reporting this!

This file violates the PDF spec!
Fixed with latest commit!