()
| 274 | print( 'test_2173() finished') |
| 275 | |
| 276 | def test_texttrace(): |
| 277 | import time |
| 278 | document = pymupdf.Document( f'{scriptdir}/resources/joined.pdf') |
| 279 | t = time.time() |
| 280 | for page in document: |
| 281 | tt = page.get_texttrace() |
| 282 | t = time.time() - t |
| 283 | print( f'test_texttrace(): t={t!r}') |
| 284 | |
| 285 | # Repeat, this time writing data to file. |
| 286 | import json |
| 287 | path = f'{scriptdir}/resources/test_texttrace.txt' |
| 288 | print( f'test_texttrace(): Writing to: {path}') |
| 289 | with open( path, 'w') as f: |
| 290 | for i, page in enumerate(document): |
| 291 | tt = page.get_texttrace() |
| 292 | print( f'page {i} json:\n{json.dumps(tt, indent=" ")}', file=f) |
| 293 | |
| 294 | |
| 295 | def test_2533(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…