Closed EluuuArcanum closed 6 months ago
This is no bug!
The default text extraction flag bits have changed since that time. If you need image meta info in this text extraction variant us the composite bit value present in e.g. TEXTFLAGS_DICT
and things will work as before.
Description of the bug
Since version 1.21.1 images are not present in the TextPage dictionary. So the examnple in section 2 in the docs does not work: https://pymupdf.readthedocs.io/en/latest/recipes-images.html#how-to-extract-images-non-pdf-documents
How to reproduce the bug
This code snippet does not work, no images are present in any pdf files.
d = page.get_text("dict") blocks = d["blocks"] # the list of block dictionaries imgblocks = [b for b in blocks if b["type"] == 1] pprint(imgblocks[0])
PyMuPDF version
1.24.2
Operating system
Windows
Python version
3.8