MCPcopy Create free account
hub / github.com/pymupdf/PyMuPDF / get_page_labels

Function get_page_labels

src_classic/utils.py:4888–4898  ·  view source on GitHub ↗

Return page label definitions in PDF document. Args: doc: PDF document (resp. 'self'). Returns: A list of dictionaries with the following format: {'startpage': int, 'prefix': str, 'style': str, 'firstpagenum': int}.

(doc)

Source from the content-addressed store, hash-verified

4886
4887
4888def get_page_labels(doc):
4889 """Return page label definitions in PDF document.
4890
4891 Args:
4892 doc: PDF document (resp. 'self').
4893 Returns:
4894 A list of dictionaries with the following format:
4895 {'startpage': int, 'prefix': str, 'style': str, 'firstpagenum': int}.
4896 """
4897 # Jorj McKie, 2021-01-10
4898 return [rule_dict(item) for item in doc._get_page_labels()]
4899
4900
4901def set_page_labels(doc, labels):

Callers

nothing calls this directly

Calls 2

_get_page_labelsMethod · 0.80
rule_dictFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…