()
| 27 | assert bbox2 in r2 |
| 28 | |
| 29 | def test_compress(): |
| 30 | document = pymupdf.open(f'{scriptdir}/resources/2.pdf') |
| 31 | document_new = pymupdf.open() |
| 32 | for page in document: |
| 33 | pixmap = page.get_pixmap( |
| 34 | colorspace=pymupdf.csRGB, |
| 35 | dpi=72, |
| 36 | annots=False, |
| 37 | ) |
| 38 | page_new = document_new.new_page(-1) |
| 39 | page_new.insert_image(rect=page_new.bound(), pixmap=pixmap) |
| 40 | document_new.save( |
| 41 | f'{scriptdir}/resources/2.pdf.compress.pdf', |
| 42 | garbage=3, |
| 43 | deflate=True, |
| 44 | deflate_images=True, |
| 45 | deflate_fonts=True, |
| 46 | pretty=True, |
| 47 | ) |
| 48 | |
| 49 | def test_3087(): |
| 50 | path = os.path.abspath(f'{__file__}/../../tests/resources/test_3087.pdf') |
nothing calls this directly
no test coverage detected
searching dependent graphs…