()
| 193 | assert repr(f) == "Font('Noto Serif Regular')" |
| 194 | |
| 195 | def test_add_ink_annot(): |
| 196 | import math |
| 197 | document = pymupdf.Document() |
| 198 | page = document.new_page() |
| 199 | line1 = [] |
| 200 | line2 = [] |
| 201 | for a in range( 0, 360*2, 15): |
| 202 | x = a |
| 203 | c = 300 + 200 * math.cos( a * math.pi/180) |
| 204 | s = 300 + 100 * math.sin( a * math.pi/180) |
| 205 | line1.append( (x, c)) |
| 206 | line2.append( (x, s)) |
| 207 | page.add_ink_annot( [line1, line2]) |
| 208 | page.insert_text((100, 72), 'Hello world') |
| 209 | page.add_text_annot((200,200), "Some Text") |
| 210 | page.get_bboxlog() |
| 211 | path = f'{scriptdir}/resources/test_add_ink_annot.pdf' |
| 212 | document.save( path) |
| 213 | print( f'Have saved to: path={path!r}') |
| 214 | |
| 215 | def test_techwriter_append(): |
| 216 | print(pymupdf.__doc__) |
nothing calls this directly
no test coverage detected
searching dependent graphs…