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

Method get_textpage

src/__init__.py:12159–12173  ·  view source on GitHub ↗
(self, clip: rect_like = None, flags: int = 0, matrix=None)

Source from the content-addressed store, hash-verified

12157 return utils.get_textpage_ocr(self, *args, **kwargs)
12158
12159 def get_textpage(self, clip: rect_like = None, flags: int = 0, matrix=None) -> "TextPage":
12160 CheckParent(self)
12161 if matrix is None:
12162 matrix = Matrix(1, 1)
12163 old_rotation = self.rotation
12164 if old_rotation != 0:
12165 self.set_rotation(0)
12166 try:
12167 textpage = self._get_textpage(clip, flags=flags, matrix=matrix)
12168 finally:
12169 if old_rotation != 0:
12170 self.set_rotation(old_rotation)
12171 textpage = TextPage(textpage)
12172 textpage.parent = weakref.proxy(self)
12173 return textpage
12174
12175 def get_texttrace(self):
12176

Callers 15

get_text_blocksFunction · 0.45
get_text_wordsFunction · 0.45
get_textboxFunction · 0.45
get_text_selectionFunction · 0.45
full_ocrFunction · 0.45
get_textpage_ocrFunction · 0.45
get_textFunction · 0.45
get_image_infoMethod · 0.45
get_textboxMethod · 0.45
search_forMethod · 0.45
make_charsFunction · 0.45
find_tablesFunction · 0.45

Calls 5

set_rotationMethod · 0.95
_get_textpageMethod · 0.95
CheckParentFunction · 0.85
MatrixClass · 0.85
TextPageClass · 0.85

Tested by 3

test_2270Function · 0.36
test_linebreaksFunction · 0.36
test_3027Function · 0.36