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

Method pdf_catalog

src/__init__.py:6065–6073  ·  view source on GitHub ↗

Get xref of PDF catalog.

(self)

Source from the content-addressed store, hash-verified

6063 yield (self.load_page(pno))
6064
6065 def pdf_catalog(self):
6066 """Get xref of PDF catalog."""
6067 pdf = _as_pdf_document(self, required=0)
6068 xref = 0
6069 if not pdf.m_internal:
6070 return xref
6071 root = mupdf.pdf_dict_get(mupdf.pdf_trailer(pdf), PDF_NAME('Root'))
6072 xref = mupdf.pdf_to_num(root)
6073 return xref
6074
6075 def pdf_trailer(self, compressed=0, ascii=0):
6076 """Get PDF trailer as a string."""

Callers 10

_set_page_labelsMethod · 0.95
markinfoMethod · 0.95
pagelayoutMethod · 0.95
pagemodeMethod · 0.95
set_markinfoMethod · 0.95
set_pagelayoutMethod · 0.95
set_pagemodeMethod · 0.95
showFunction · 0.80
showFunction · 0.80
getFunction · 0.80

Calls 3

_as_pdf_documentFunction · 0.85
PDF_NAMEFunction · 0.85
pdf_trailerMethod · 0.80

Tested by 1

getFunction · 0.64