File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 9696# This replace fz_find_table_within_bounds.
9797USE_TGIF = os .getenv ("USE_TGIF" , "0" )
9898EXTRACTOR_V4 = None # Keep pylint happy.
99- if USE_TGIF == "1" :
99+ if USE_TGIF == "0" :
100+ if os .environ .get ('PYMUPDF_LEGACY_TABLE_DIAGNOSTIC' ) != '0' :
101+ print ("Using legacy table grid extraction." )
102+ elif USE_TGIF == "1" :
100103 print ("Using TGIFVx for table grid extraction." )
101104 import pymupdf .tgif # pylint: disable=import-error
102105elif USE_TGIF == "4" :
113116 # filter_empty_lines=not args.no_filter_empty,
114117 )
115118else :
116- if os .environ .get ('PYMUPDF_LEGACY_TABLE_DIAGNOSTIC' ) != '0' :
117- print ("Using legacy table grid extraction." )
119+ raise Exception (f"Unrecognised { USE_TGIF = } , should be unset, '0', '1' or '4'." )
118120
119121EDGES = [] # vector graphics from PyMuPDF
120122CHARS = [] # text characters from PyMuPDF
You can’t perform that action at this time.
0 commit comments