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

Function get

tests/test_textextract.py:187–195  ·  view source on GitHub ↗
(flags=None)

Source from the content-addressed store, hash-verified

185 n_fffd_bad = 749
186
187 def get(flags=None):
188 text = [page.get_text(flags=flags) for page in document]
189 assert len(text) == 1
190 text = text[0]
191 n_fffd = text.count(chr(0xfffd))
192 if 0:
193 # This print() fails on Windows with UnicodeEncodeError.
194 print(f'{flags=} {n_fffd=} {text=}')
195 return text, n_fffd
196
197 text_none, n_fffd_none = get()
198 text_0, n_fffd_0 = get(flags0)

Callers 1

test_2954Function · 0.70

Calls 1

get_textMethod · 0.45

Tested by

no test coverage detected