Delete annot and return next one.
(self, annot)
| 10867 | return self.cropbox.tl |
| 10868 | |
| 10869 | def delete_annot(self, annot): |
| 10870 | """Delete annot and return next one.""" |
| 10871 | CheckParent(self) |
| 10872 | CheckParent(annot) |
| 10873 | |
| 10874 | page = self._pdf_page() |
| 10875 | while 1: |
| 10876 | # first loop through all /IRT annots and remove them |
| 10877 | irt_annot = JM_find_annot_irt(annot.this) |
| 10878 | if not irt_annot: # no more there |
| 10879 | break |
| 10880 | mupdf.pdf_delete_annot(page, irt_annot.this) |
| 10881 | nextannot = mupdf.pdf_next_annot(annot.this) # store next |
| 10882 | mupdf.pdf_delete_annot(page, annot.this) |
| 10883 | val = Annot(nextannot) |
| 10884 | |
| 10885 | if val: |
| 10886 | val.thisown = True |
| 10887 | val.parent = weakref.proxy(self) # owning page object |
| 10888 | val.parent._annot_refs[id(val)] = val |
| 10889 | annot._erase() |
| 10890 | return val |
| 10891 | |
| 10892 | def delete_image(page: 'Page', xref: int): |
| 10893 | """Delete the image referred to by xef. |