Replies: 1 comment 1 reply
-
Unless you can share the file in question, I'm afraid that there's not much to say about this :). PDF syntax is already quite fungible, and while pyHanko's parser is indeed a bit pickier than most, allowing malformed object refs (and e.g. defaulting them to |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have some PDF files - ones already signed by Jotform - that cause the following error to be raised. There seems to be an invalid reference in the PDF files; when I catch the error on line 279 of the same file and handle it (ignore that missing reference by naively just returning
BooleanObject(False)
) I can load and manipulate the file as expected.I know that is not the correct fix. My question is, how can I debug this error to get more specific information about the conditions causing the problem, so that I can implement the correct fix?
I used an old tool called 'peepdf' and it suggested that the stream location referenced by the raised error was inside of an embedded image, which doesn't' seem correct.
https://github.com/MatthiasValvekens/pyHanko/blob/6da540450eee75a00d7379a3b202bd31c2fb9922/pyhanko/pdf_utils/generic.py#L616C1-L618C14
Beta Was this translation helpful? Give feedback.
All reactions