()
| 303 | test_4412_path = os.path.normpath(f'{__file__}/../../tests/resources/test_4412.pdf') |
| 304 | |
| 305 | def test_4412(): |
| 306 | # This tests whether a page from a PDF containing widgets found in the wild |
| 307 | # can be inserted into a new document with default options (widget=True) |
| 308 | # and widget=False. |
| 309 | print() |
| 310 | for widget in True, False: |
| 311 | print(f'{widget=}', flush=1) |
| 312 | with pymupdf.open(test_4412_path) as doc, pymupdf.open() as new_doc: |
| 313 | buf = io.BytesIO() |
| 314 | new_doc.insert_pdf(doc, from_page=1, to_page=1) |
| 315 | new_doc.save(buf) |
| 316 | assert len(new_doc)==1 |
| 317 | |
| 318 | |
| 319 | def test_4571(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…