()
| 213 | print( f'Have saved to: path={path!r}') |
| 214 | |
| 215 | def test_techwriter_append(): |
| 216 | print(pymupdf.__doc__) |
| 217 | doc = pymupdf.open() |
| 218 | page = doc.new_page() |
| 219 | tw = pymupdf.TextWriter(page.rect) |
| 220 | text = "Red rectangle = TextWriter.text_rect, blue circle = .last_point" |
| 221 | r = tw.append((100, 100), text) |
| 222 | print(f'r={r!r}') |
| 223 | tw.write_text(page) |
| 224 | page.draw_rect(tw.text_rect, color=pymupdf.pdfcolor["red"]) |
| 225 | page.draw_circle(tw.last_point, 2, color=pymupdf.pdfcolor["blue"]) |
| 226 | path = f"{scriptdir}/resources/test_techwriter_append.pdf" |
| 227 | doc.ez_save(path) |
| 228 | print( f'Have saved to: {path}') |
| 229 | |
| 230 | def test_opacity(): |
| 231 | doc = pymupdf.open() |
nothing calls this directly
no test coverage detected
searching dependent graphs…