File tree Expand file tree Collapse file tree 2 files changed +32
-0
lines changed
Expand file tree Collapse file tree 2 files changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -780,3 +780,35 @@ def test_extendable_textpage():
780780
781781 path3 = os .path .normpath (f'{ __file__ } /../../tests/test_extendable_textpage3.pdf' )
782782 document .save (path3 )
783+
784+
785+ def test_4363 ():
786+ print ()
787+ print (f'{ pymupdf .version = } ' )
788+ path = os .path .normpath (f'{ __file__ } /../../tests/resources/test_4363.pdf' )
789+ n = 0
790+ texts = list ()
791+ with pymupdf .open (path ) as document :
792+ assert len (document ) == 1
793+ page = document [0 ]
794+ t = page .search_for ('tour' )
795+ print (f'{ t = } ' )
796+ n += len (t )
797+ text = page .get_text ()
798+ texts .append (text )
799+ print (f'{ n = } ' )
800+ print (f'{ len (texts )= } ' )
801+ text = texts [0 ]
802+ print ('text:' )
803+ print (f'{ text = } ' )
804+ text_expected = (
805+ 'Deal Roadshow SiteTour\n '
806+ 'We know your process. We know your standard.\n '
807+ 'Professional Site Tour Video Productions for the Capital Markets.\n '
808+ '1\n '
809+ )
810+ if text != text_expected :
811+ print (f'Expected:\n { text_expected !r} ' )
812+ print (f'Found:\n { text !r} ' )
813+ assert 0
814+
You can’t perform that action at this time.
0 commit comments