-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
IndexError: index out of range when encountering a digital certificate/signature #1245
Comments
I keep getting an error uploading the PDF. https://static.e-publishing.af.mil/production/1/af_a1/form/af707/af707.pdf This (^) is a blank version. |
@Bryan-Fagan , thanks for your PDF. |
pubpub-zz
pushed a commit
to pubpub-zz/pypdf
that referenced
this issue
Aug 20, 2022
fixes py-pdf#1245: case where AES decrypt returns empty bytestring
pubpub-zz
added a commit
to pubpub-zz/pypdf
that referenced
this issue
Aug 20, 2022
pubpub-zz
added a commit
to pubpub-zz/pypdf
that referenced
this issue
Aug 20, 2022
refered PR to fix the issue of the decrypt error. however further decoding needs to look at the XFA data |
MartinThoma
pushed a commit
that referenced
this issue
Aug 21, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'll start with I'm very new to using Python and PyPDF. I'm trying to collect all of the fields within a pdf to collect into a dataframe. Eventually I want to collect thousands of PDFs that all have the same structure (form) as the baseline and place them into the PDF. I was able to get this code to work great on a PDF without a digital certificate/signature. However, when I run the code on a PDF with the digital certificate/signature I get an error.
I don't really need the digital signature/certificate spot of the document so I think the easiest way to do this is to just skip that field of the PDF. However, I don't know how to do that since the PyPDF2 package looks at every field.
I was able to get around the error by doing try/except but then it wouldn't capture the information from the pdf (i.e. result was blank).
Environment
Plotly Dash Workspace
Code + PDF
I'll have to play around with the PDF to see if I can post it as it have PII information.
Traceback
TODO
I believe the best solution would be something for if the getFields() or getFormFields() methods encounter a digital signature/certificate then it passes that field.
The text was updated successfully, but these errors were encountered: