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

Method _apply_redactions

src/__init__.py:9886–9894  ·  view source on GitHub ↗
(self, text, images, graphics)

Source from the content-addressed store, hash-verified

9884 return Annot(annot)
9885
9886 def _apply_redactions(self, text, images, graphics):
9887 page = self._pdf_page()
9888 opts = mupdf.PdfRedactOptions()
9889 opts.black_boxes = 0 # no black boxes
9890 opts.text = text # how to treat text
9891 opts.image_method = images # how to treat images
9892 opts.line_art = graphics # how to treat vector graphics
9893 success = mupdf.pdf_redact_page(page.doc(), page, opts)
9894 return success
9895
9896 def _erase(self):
9897 self._reset_annot_refs()

Callers 2

apply_redactionsMethod · 0.80
apply_redactionsFunction · 0.80

Calls 1

_pdf_pageMethod · 0.95

Tested by

no test coverage detected