PyMuPDF icon indicating copy to clipboard operation
PyMuPDF copied to clipboard

page.get_label() gets wrong label on the first page of doc

Open binshe opened this issue 1 year ago • 0 comments

Description of the bug

>>> import pymupdf

>>> pymupdf.version
('1.24.4', '1.24.2', '20240516000001')
>>> doc = pymupdf.open("test3.pdf")

>>> doc._get_page_labels()
[(0, '<</S/A>>'), (13, '<</S/r>>'), (15, '<</S/D>>')]
>>> doc[0].get_label()
'B'

First page label supposed to be 'A' ...

Please take a look.

How to reproduce the bug

As in description

PyMuPDF version

1.24.4

Operating system

MacOS

Python version

3.9

binshe avatar May 22 '24 14:05 binshe