Skip to content
Discussion options

You must be logged in to vote

If the same image reference name occurs lime "Im0", then it at least should only happen if the image references occur in different XObjects. You can reveal this situation by page.get_images(True). The items of this list are longer and contain the xref of the responsible XObject. If it was the page itself, that last item is 0.

In [1]: import fitz
In [2]: doc=fitz.open("x0.pdf")
In [3]: page=doc[0]
In [4]: page.get_images(True)
Out[4]: [(15, 16, 1200, 1200, 8, 'DeviceRGB', '', 'Im1', 'FlateDecode', 0)]  # image invoked by page itself!

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@Fake45mar
Comment options

@JorjMcKie
Comment options

Answer selected by JorjMcKie
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
not a bug not a bug / user error / unable to reproduce
2 participants
Converted from issue

This discussion was converted from issue #2331 on April 10, 2023 14:19.