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

Method pagelayout

src/__init__.py:6009–6020  ·  view source on GitHub ↗

Return the PDF PageLayout value.

(self)

Source from the content-addressed store, hash-verified

6007
6008 @property
6009 def pagelayout(self) -> str:
6010 """Return the PDF PageLayout value.
6011 """
6012 xref = self.pdf_catalog()
6013 if xref == 0:
6014 return None
6015 rc = self.xref_get_key(xref, "PageLayout")
6016 if rc[0] == "null":
6017 return "SinglePage"
6018 if rc[0] == "name":
6019 return rc[1][1:]
6020 return "SinglePage"
6021
6022 @property
6023 def pagemode(self) -> str:

Callers

nothing calls this directly

Calls 2

pdf_catalogMethod · 0.95
xref_get_keyMethod · 0.95

Tested by

no test coverage detected