Ensure that incomplete clip paths will be properly ignored.
()
| 163 | |
| 164 | |
| 165 | def test_2556(): |
| 166 | """Ensure that incomplete clip paths will be properly ignored.""" |
| 167 | doc = pymupdf.open() # new empty PDF |
| 168 | page = doc.new_page() # new page |
| 169 | # following contains an incomplete clip |
| 170 | c = b"q 50 697.6 400 100.0 re W n q 0 0 m W n Q " |
| 171 | xref = doc.get_new_xref() # prepare /Contents object for page |
| 172 | doc.update_object(xref, "<<>>") # new xref now is a dictionary |
| 173 | doc.update_stream(xref, c) # store drawing commands |
| 174 | page.set_contents(xref) # give the page this xref as /Contents |
| 175 | # following will bring down interpreter if fix not installed |
| 176 | assert page.get_drawings(extended=True) |
| 177 | |
| 178 | |
| 179 | def test_3207(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…