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

Function get_label

src_classic/utils.py:4776–4790  ·  view source on GitHub ↗

Return the label for this PDF page. Args: page: page object. Returns: The label (str) of the page. Errors return an empty string.

(page)

Source from the content-addressed store, hash-verified

4774
4775
4776def get_label(page):
4777 """Return the label for this PDF page.
4778
4779 Args:
4780 page: page object.
4781 Returns:
4782 The label (str) of the page. Errors return an empty string.
4783 """
4784 # Jorj McKie, 2021-01-06
4785
4786 labels = page.parent._get_page_labels()
4787 if not labels:
4788 return ""
4789 labels.sort()
4790 return get_label_pno(page.number, labels)
4791
4792
4793def get_page_numbers(doc, label, only_one=False):

Callers

nothing calls this directly

Calls 2

_get_page_labelsMethod · 0.80
get_label_pnoFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…