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

Function Page__add_text_marker

src/__init__.py:22125–22145  ·  view source on GitHub ↗
(self, quads, annot_type)

Source from the content-addressed store, hash-verified

22123
22124
22125def Page__add_text_marker(self, quads, annot_type):
22126 pdfpage = self._pdf_page()
22127 rotation = JM_page_rotation(pdfpage)
22128 def final():
22129 if rotation != 0:
22130 mupdf.pdf_dict_put_int(pdfpage.obj(), PDF_NAME('Rotate'), rotation)
22131 try:
22132 if rotation != 0:
22133 mupdf.pdf_dict_put_int(pdfpage.obj(), PDF_NAME('Rotate'), 0)
22134 annot = mupdf.pdf_create_annot(pdfpage, annot_type)
22135 for item in quads:
22136 q = JM_quad_from_py(item)
22137 mupdf.pdf_add_annot_quad_point(annot, q)
22138 mupdf.pdf_update_annot(annot)
22139 JM_add_annot_id(annot, "A")
22140 final()
22141 except Exception:
22142 if g_exceptions_verbose: exception_info()
22143 final()
22144 return
22145 return Annot(annot)
22146
22147
22148def PDF_NAME(x):

Callers 1

_add_text_markerMethod · 0.85

Calls 8

JM_page_rotationFunction · 0.85
PDF_NAMEFunction · 0.85
JM_quad_from_pyFunction · 0.85
JM_add_annot_idFunction · 0.85
finalFunction · 0.85
exception_infoFunction · 0.85
AnnotClass · 0.85
_pdf_pageMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…