page.get_images() returns the images from other pages #3898
-
with a certain PDF file, vitas.pdf, when i use page.get_images() on the first page for example, it returns every image in the PDF. I have tested with other PDFs and it works correctly and only returns images from the same page. How can I solve this? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
This method returns the contents of the respective part of the page's object definition. It is not a statement about what the page in fact shows. |
Beta Was this translation helpful? Give feedback.
This method returns the contents of the respective part of the page's object definition. It is not a statement about what the page in fact shows.
The PDF creator can enter whatever in that array.
You can use
page.get_image_info()
instead.Or use
page.clean_contents()
before execution. This will make a run through the page's source code and synchronize its object definitions with what really happens during page dislay.