-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Labels
Has MCVEA minimal, complete and verifiable example helps a lot to debug / understand feature requestsA minimal, complete and verifiable example helps a lot to debug / understand feature requestsis-bugFrom a users perspective, this is a bug - a violation of the expected behavior with a compliant PDFFrom a users perspective, this is a bug - a violation of the expected behavior with a compliant PDF
Description
When extracting images from the following PDF, this error is raised:
Error
AttributeError: 'ArrayObject' object has no attribute 'get
Environment
Which environment were you using when you encountered the problem?
$ python -m platform
Windows-10-10.0.22621-SP0
$ python -c "import pypdf;print(pypdf.__version__)"
3.12.2Code + PDF
This is a minimal example that shows the issue:
reader = PdfReader(file, strict=False)
writer = PdfWriter()
writer.clone_document_from_reader(reader)
for page in writer.pages:
for img_obj in page.images:
img_count += 1Sample PDF:
example_121.pdf
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Has MCVEA minimal, complete and verifiable example helps a lot to debug / understand feature requestsA minimal, complete and verifiable example helps a lot to debug / understand feature requestsis-bugFrom a users perspective, this is a bug - a violation of the expected behavior with a compliant PDFFrom a users perspective, this is a bug - a violation of the expected behavior with a compliant PDF