-
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
AttributeError: 'DictionaryObject' object has no attribute 'indirect_reference'
#1614
Comments
Note that very few files show this weird behaviour. Out of the test set of 60 similar files by the same author, only 2 of them had the issue described above. |
The issue is caused by the /annots array containing (direct) Dictionary Object and not indirect Object. I've improved robustness. Can you confirm the PR fixes all your cases ? |
Sorry, I'm not too familiar with python environments - how can I install that custom version for testing? |
The easiest solution I propose: |
Okay, got it to work with previously manually uninstalling Seems to have fully solved the problem, thanks! |
I have come across the same issue, but failing on a different line of code in EnvironmentWhich environment were you using when you encountered the problem?
Code + PDFThis is a minimal, complete example that shows the issue:
Full example file
Traceback
|
@mchesterkadwell edit: PR is available if you want to try it |
Hey @MartinThoma, |
@jainharsh97, |
I'm trying to merge a few PDF files using this library into one single file by just appending them into a new document one-by-one. However, some of the input files seem to run into the error described in the title above when trying to call
append(fileobj=open(...))
.I suspect it has something to do with the image shown on the example PDF... it might not be "imported" properly or something, as it also disappears from the slide when trying to use the "Black"-Feature of Adobe Acrobat.
Environment
Which environment were you using when you encountered the problem?
$ python -m platform Linux-5.15.79.1-microsoft-standard-WSL2-x86_64-with-glibc2.35 $ python -c "import pypdf;print(pypdf.__version__)" 3.4.0
Code + PDF
This is a minimal, complete example that shows the issue:
Full example file
I don't own the right to any of the contents on this slide, but I'm sure some of your magicians can craft up a similar file for the testing environments.
broke.pdf
Traceback
This is the complete Traceback I see:
The text was updated successfully, but these errors were encountered: