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

Method _addWidget

src/__init__.py:9877–9884  ·  view source on GitHub ↗
(self, field_type, field_name)

Source from the content-addressed store, hash-verified

9875 message(f"skipping bad link / annot item {i:d}.\n")
9876
9877 def _addWidget(self, field_type, field_name):
9878 page = self._pdf_page()
9879 pdf = page.doc()
9880 annot = JM_create_widget(pdf, page, field_type, field_name)
9881 if not annot.m_internal:
9882 raise RuntimeError( "cannot create widget")
9883 JM_add_annot_id(annot, "W")
9884 return Annot(annot)
9885
9886 def _apply_redactions(self, text, images, graphics):
9887 page = self._pdf_page()

Callers 1

add_widgetMethod · 0.95

Calls 4

_pdf_pageMethod · 0.95
JM_create_widgetFunction · 0.85
JM_add_annot_idFunction · 0.85
AnnotClass · 0.85

Tested by

no test coverage detected