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

Method get_textbox

src/__init__.py:12129–12142  ·  view source on GitHub ↗
(
            page: Page,
            rect: rect_like,
            textpage=None,  #: TextPage = None,
            )

Source from the content-addressed store, hash-verified

12127 return text
12128
12129 def get_textbox(
12130 page: Page,
12131 rect: rect_like,
12132 textpage=None, #: TextPage = None,
12133 ) -> str:
12134 tp = textpage
12135 if tp is None:
12136 tp = page.get_textpage()
12137 elif getattr(tp, "parent") != page:
12138 raise ValueError("not a textpage of this page")
12139 rc = tp.extractTextbox(rect)
12140 if textpage is None:
12141 del tp
12142 return rc
12143
12144 def get_text(self, *args, **kwargs):
12145 return utils.get_text(self, *args, **kwargs)

Callers 8

get_textboxMethod · 0.45
cells_to_tablesFunction · 0.45
_get_headerMethod · 0.45
test_3848Function · 0.45
test_search1Function · 0.45
test_2270Function · 0.45
test_2730Function · 0.45
test_2553Function · 0.45

Calls 2

extractTextboxMethod · 0.80
get_textpageMethod · 0.45

Tested by 5

test_3848Function · 0.36
test_search1Function · 0.36
test_2270Function · 0.36
test_2730Function · 0.36
test_2553Function · 0.36