import pymupdf
pdf = pymupdf.open("...zero_pages.pdf")
# this raises ValueError: bad start page number
for page in pdf.pages():
print(page.number)
# this hangs forever
for page in pdf.pages(-1, -1):
print(page.number)
I've tried this on Mac and Linux, and with PyMuPDF versions 1.24.9 and 1.24.13
Description of the bug
PyMuPDF is able to open this PDF, but hangs if I try to iterate over the pages backwards.
How to reproduce the bug
zero_pages.pdf
I've tried this on Mac and Linux, and with PyMuPDF versions 1.24.9 and 1.24.13
PyMuPDF version
1.24.13
Operating system
MacOS
Python version
3.11