File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -667,3 +667,26 @@ def test_4699():
667667 wt = pymupdf .TOOLS .mupdf_warnings ()
668668 assert 'syntax error: cannot find ExtGState resource' in wt
669669 assert rms > 20
670+
671+
672+ def test_5001 ():
673+ '''
674+ #5001 is fixed with mupdf>=1.28.
675+ '''
676+ path = os .path .normpath (f'{ __file__ } /../../tests/resources/test_5001.pdf' )
677+ path_expected = os .path .normpath (f'{ __file__ } /../../tests/resources/test_5001_expected.png' )
678+ path_out = os .path .normpath (f'{ __file__ } /../../tests/test_5001_out.png' )
679+ with pymupdf .open (path ) as document :
680+ page = document [0 ]
681+ zoom = 0.3
682+ pixmap = page .get_pixmap (matrix = pymupdf .Matrix (zoom , zoom ))
683+ pixmap .save (path_out )
684+ rms = gentle_compare .pixmaps_rms (path_expected , pixmap )
685+ print ()
686+ print (f'test_5001(): { rms = } ' )
687+ if pymupdf .mupdf_version_tuple >= (1 , 28 ):
688+ assert rms == 0
689+ else :
690+ assert rms != 0
691+ wt = pymupdf .TOOLS .mupdf_warnings ()
692+ assert wt
You can’t perform that action at this time.
0 commit comments