File tree Expand file tree Collapse file tree 3 files changed +19
-0
lines changed Expand file tree Collapse file tree 3 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -631,3 +631,22 @@ def test_4388():
631631 assert rms == 0
632632 else :
633633 assert rms >= 10
634+
635+
636+ def test_4699 ():
637+ path = os .path .normpath (f'{ __file__ } /../../tests/resources/test_4699.pdf' )
638+ path_png_expected = os .path .normpath (f'{ __file__ } /../../tests/resources/test_4699.png' )
639+ path_png_actual = os .path .normpath (f'{ __file__ } /../../tests/test_4699.png' )
640+ with pymupdf .open (path ) as document :
641+ page = document [0 ]
642+ pixmap = page .get_pixmap ()
643+ pixmap .save (path_png_actual )
644+ print (f'Have saved to { path_png_actual = } .' )
645+ rms = gentle_compare .pixmaps_rms (path_png_expected , pixmap )
646+ print (f'test_4699(): { rms = } ' )
647+ if pymupdf .mupdf_version_tuple >= (1 , 27 ):
648+ assert rms == 0
649+ else :
650+ wt = pymupdf .TOOLS .mupdf_warnings ()
651+ assert 'syntax error: cannot find ExtGState resource' in wt
652+ assert rms > 20
You can’t perform that action at this time.
0 commit comments