Skip to content

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

@binshe

Description

@binshe

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions