MCPcopy Index your code
hub / github.com/pymupdf/PyMuPDF / get_page_text

Method get_page_text

src/__init__.py:5150–5169  ·  view source on GitHub ↗

Extract a document page's text by page number. Notes: Convenience function calling page.get_text(). Args: pno: page number option: (str) text, words, blocks, html, dict, json, rawdict, xhtml or xml. Returns: output from page.Te

(
            doc: 'Document',
            pno: int,
            option: str = "text",
            clip: rect_like = None,
            flags: OptInt = None,
            textpage: 'TextPage' = None,
            sort: bool = False,
            )

Source from the content-addressed store, hash-verified

5148 )
5149
5150 def get_page_text(
5151 doc: 'Document',
5152 pno: int,
5153 option: str = "text",
5154 clip: rect_like = None,
5155 flags: OptInt = None,
5156 textpage: 'TextPage' = None,
5157 sort: bool = False,
5158 ) -> typing.Any:
5159 """Extract a document page's text by page number.
5160
5161 Notes:
5162 Convenience function calling page.get_text().
5163 Args:
5164 pno: page number
5165 option: (str) text, words, blocks, html, dict, json, rawdict, xhtml or xml.
5166 Returns:
5167 output from page.TextPage().
5168 """
5169 return doc[pno].get_text(option, clip=clip, flags=flags, sort=sort)
5170
5171 def get_page_xobjects(self, pno: int) -> list:
5172 """Retrieve a list of XObjects used on a page.

Callers

nothing calls this directly

Calls 1

get_textMethod · 0.45

Tested by

no test coverage detected