This commit is contained in:
ari committed 2019-12-11 22:16:28 -05:00
1 parent 36a9371657
commit 152d3aaf55
13 files changed
+35 -12

No files matched your search

+1 -1
View File
@@ -14,7 +14,7 @@ NUM_LOOPS = 10
def count_elms(file_path: str):
count = 0
for page in PDFInterpreter(file_path):
for page in PDFInterpreter(file_path, ignore_bad_chars=True):
for item in page:
if isinstance(item, LTContainer):
count += len([*item])
+1
View File
@@ -42,6 +42,7 @@ class ConversionTest(TestCase):
input_file=input_file_path,
output_file=output_file_path,
out_type=ext,
ignore_bad_chars=True,
debug_level=logging.WARN,
)
if ext == 'xml':
+1 -1
View File
@@ -16,7 +16,7 @@ class TestInterpreter(TestCase):
for file_name in FILES:
self.subTest(file_name=file_name)
file_path = os.path.join(INPUT_FOLDER, file_name)
for page in PDFInterpreter(file_path, debug_level=logging.ERROR):
for page in PDFInterpreter(file_path, debug_level=logging.ERROR, ignore_bad_chars=True):
self.assertTrue( isinstance(page, PageInterpreter) )
for item in page:
self.assertTrue( isinstance(item, LTItem) )