Prepare for annotation insertion on the page. Returns: Old page rotation value. Temporarily sets rotation to 0 when required.
(page: "Page")
| 23677 | |
| 23678 | |
| 23679 | def annot_preprocess(page: "Page") -> int: |
| 23680 | """Prepare for annotation insertion on the page. |
| 23681 | |
| 23682 | Returns: |
| 23683 | Old page rotation value. Temporarily sets rotation to 0 when required. |
| 23684 | """ |
| 23685 | CheckParent(page) |
| 23686 | if not page.parent.is_pdf: |
| 23687 | raise ValueError("is no PDF") |
| 23688 | old_rotation = page.rotation |
| 23689 | if old_rotation != 0: |
| 23690 | page.set_rotation(0) |
| 23691 | return old_rotation |
| 23692 | |
| 23693 | |
| 23694 | def annot_postprocess(page: "Page", annot: "Annot") -> None: |
no test coverage detected
searching dependent graphs…