refactor(pdf_parse): adjust line count threshold for layoutreader

- Lower the line count threshold from 316 to 200 to ensure compatibility
- This change aims to prevent potential issues with layoutreader's maximum line support
This commit is contained in:
myhloli
2024-11-08 12:06:15 +08:00
parent 5468e56fba
commit 5936684fd8
+1 -1
View File
@@ -298,7 +298,7 @@ def sort_lines_by_model(fix_blocks, page_w, page_h, line_height):
block['lines'].append({'bbox': line, 'spans': []})
page_line_list.extend(lines)
if len(page_line_list) > 316: # layoutreader最高支持512line
if len(page_line_list) > 200: # layoutreader最高支持512line
return None
# 使用layoutreader排序