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

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

Closed
wingjson opened this issue Mar 7, 2024 · 4 comments
Closed

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

wingjson opened this issue Mar 7, 2024 · 4 comments
Assignees

Comments

@wingjson
Copy link

wingjson commented Mar 7, 2024

  • 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

@hhrutter
Copy link
Collaborator

hhrutter commented Mar 7, 2024

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.

@wingjson
Copy link
Author

wingjson commented Mar 7, 2024

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

@hhrutter
Copy link
Collaborator

👍🏻 thanks for reporting this!

@hhrutter
Copy link
Collaborator

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

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