Test for removing text and graphics.
()
| 198 | |
| 199 | |
| 200 | def test_redact3(): |
| 201 | """Test for removing text and graphics.""" |
| 202 | if not hasattr(pymupdf, "mupdf"): |
| 203 | print("Not executing 'test_redact3' in classic") |
| 204 | return |
| 205 | filename = os.path.join(scriptdir, "resources", "symbol-list.pdf") |
| 206 | doc = pymupdf.open(filename) |
| 207 | page = doc[0] |
| 208 | page.add_redact_annot(page.rect) |
| 209 | page.apply_redactions() |
| 210 | assert not page.get_text("words") |
| 211 | assert not page.get_drawings() |
| 212 | |
| 213 | |
| 214 | def test_redact4(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…