()
| 223 | assert 1800000 < s < 2600000, f'Unexpected size of {path}: {s}' |
| 224 | |
| 225 | def test_3072(): |
| 226 | path = os.path.abspath(f'{__file__}/../../tests/resources/test_3072.pdf') |
| 227 | out = os.path.abspath(f'{__file__}/../../tests') |
| 228 | |
| 229 | doc = pymupdf.open(path) |
| 230 | page_48 = doc[0] |
| 231 | bbox = [147, 300, 447, 699] |
| 232 | rect = pymupdf.Rect(*bbox) |
| 233 | zoom = pymupdf.Matrix(3, 3) |
| 234 | pix = page_48.get_pixmap(clip=rect, matrix=zoom) |
| 235 | image_save_path = f'{out}/1.jpg' |
| 236 | pix.save(image_save_path, jpg_quality=95) |
| 237 | |
| 238 | doc = pymupdf.open(path) |
| 239 | page_49 = doc[1] |
| 240 | bbox = [147, 543, 447, 768] |
| 241 | rect = pymupdf.Rect(*bbox) |
| 242 | zoom = pymupdf.Matrix(3, 3) |
| 243 | pix = page_49.get_pixmap(clip=rect, matrix=zoom) |
| 244 | image_save_path = f'{out}/2.jpg' |
| 245 | pix.save(image_save_path, jpg_quality=95) |
| 246 | wt = pymupdf.TOOLS.mupdf_warnings() |
| 247 | assert wt == ( |
| 248 | "syntax error: cannot find ExtGState resource 'BlendMode0'\n" |
| 249 | "encountered syntax errors; page may not be correct\n" |
| 250 | "syntax error: cannot find ExtGState resource 'BlendMode0'\n" |
| 251 | "encountered syntax errors; page may not be correct" |
| 252 | ) |
| 253 | |
| 254 | def test_3134(): |
| 255 | doc = pymupdf.Document() |
nothing calls this directly
no test coverage detected
searching dependent graphs…