(
page: Page,
rect: rect_like,
textpage: TextPage = None,
)
| 573 | |
| 574 | |
| 575 | def get_textbox( |
| 576 | page: Page, |
| 577 | rect: rect_like, |
| 578 | textpage: TextPage = None, |
| 579 | ) -> str: |
| 580 | tp = textpage |
| 581 | if tp is None: |
| 582 | tp = page.get_textpage() |
| 583 | elif getattr(tp, "parent") != page: |
| 584 | raise ValueError("not a textpage of this page") |
| 585 | rc = tp.extractTextbox(rect) |
| 586 | if textpage is None: |
| 587 | del tp |
| 588 | return rc |
| 589 | |
| 590 | |
| 591 | def get_text_selection( |
nothing calls this directly
no test coverage detected
searching dependent graphs…