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

Method get_texttrace

src/__init__.py:12175–12194  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

12173 return textpage
12174
12175 def get_texttrace(self):
12176
12177 CheckParent(self)
12178 old_rotation = self.rotation
12179 if old_rotation != 0:
12180 self.set_rotation(0)
12181 page = self.this
12182 rc = []
12183 if 1 or g_use_extra:
12184 dev = extra.JM_new_texttrace_device(rc)
12185 else:
12186 dev = JM_new_texttrace_device(rc)
12187 prect = mupdf.fz_bound_page(page)
12188 dev.ptm = mupdf.FzMatrix(1, 0, 0, -1, 0, prect.y1)
12189 mupdf.fz_run_page(page, dev, mupdf.FzMatrix(), mupdf.FzCookie())
12190 mupdf.fz_close_device(dev)
12191
12192 if old_rotation != 0:
12193 self.set_rotation(old_rotation)
12194 return rc
12195
12196 def get_xobjects(self):
12197 """List of xobjects defined in the page object."""

Callers 7

subset_fontsMethod · 0.80
subset_fontsFunction · 0.80
test_htmlbox3Function · 0.80
test_texttraceFunction · 0.80
test_2533Function · 0.80
test_2645Function · 0.80
test_2506Function · 0.80

Calls 3

set_rotationMethod · 0.95
CheckParentFunction · 0.85

Tested by 5

test_htmlbox3Function · 0.64
test_texttraceFunction · 0.64
test_2533Function · 0.64
test_2645Function · 0.64
test_2506Function · 0.64