Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions pymupdf4llm/pymupdf4llm/helpers/pymupdf_rag.py
Original file line number Diff line number Diff line change
Expand Up @@ -1052,6 +1052,10 @@ def get_page_output(
else:
tabs = page.find_tables(clip=parms.clip, strategy=table_strategy)
for t in tabs.tables:
# Skip tables with no valid cells (would cause bbox calculation to fail)
if not any(c is not None for c in t.cells):
continue

# remove tables with too few rows or columns
if t.row_count < 2 or t.col_count < 2:
omitted_table_rects.append(pymupdf.Rect(t.bbox))
Expand Down