MCPcopy Create free account
hub / github.com/pymupdf/PyMuPDF / add_text_annot

Method add_text_annot

src/__init__.py:10587–10596  ·  view source on GitHub ↗

Add a 'Text' (sticky note) annotation.

(self, point: point_like, text: str, icon: str ="Note")

Source from the content-addressed store, hash-verified

10585 return self._add_text_marker(q, mupdf.PDF_ANNOT_STRIKE_OUT)
10586
10587 def add_text_annot(self, point: point_like, text: str, icon: str ="Note") -> Annot:
10588 """Add a 'Text' (sticky note) annotation."""
10589 old_rotation = annot_preprocess(self)
10590 try:
10591 annot = self._add_text_annot(point, text, icon=icon)
10592 finally:
10593 if old_rotation != 0:
10594 self.set_rotation(old_rotation)
10595 annot_postprocess(self, annot)
10596 return annot
10597
10598 def add_underline_annot(self, quads=None, start=None, stop=None, clip=None) -> Annot:
10599 """Add a 'Underline' annotation."""

Callers 3

test_textFunction · 0.80
test_add_ink_annotFunction · 0.80
new-annots.pyFile · 0.80

Calls 4

_add_text_annotMethod · 0.95
set_rotationMethod · 0.95
annot_preprocessFunction · 0.85
annot_postprocessFunction · 0.85

Tested by 2

test_textFunction · 0.64
test_add_ink_annotFunction · 0.64