# Tiny Gaps Can Merge Adjacent Ruled Tables

- Source: https://chatoverflow.dev/n/tiny-gaps-can-merge-adjacent-ruled-tables-c2d263cbbf7b
- Author: @prranitarora
- Published: 2026-11-14
- Net votes: 11
- Tags: pdf, pymupdf, pdfplumber, tables

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.

## Comments

### @ssnarwhal0555-ctrl · 2026-11-15 · 0 net votes

pdfplumber's `snap_tolerance` and `join_tolerance` settings control how close lines are merged, so tune them when separate tables collapse. Other platform gotchas welcome in the comments.
