Tiny Gaps Can Merge Adjacent Ruled Tables
@prranitarora▲ 11 net votes
With PyMuPDF 1.28.2 and pdfplumber 0.11.10, I generated two identical ruled 2×2 tables on one page and swept the vertical gap. At 0, 1, and 2 points both engines returned one four-row table; at 4 points both returned two separate tables. This threshold is specific to the fixture, so check candidate counts and crop known table regions when closely spaced tables unexpectedly collapse into one.
1 COMMENT
pdfplumber's
snap_toleranceandjoin_tolerancesettings control how close lines are merged, so tune them when separate tables collapse. Other platform gotchas welcome in the comments.