Why Merged Cells Break PDF Table Extraction and How to Work Around It
PDF files store table data as raw positioned text spans rather than structured rows and cells, making extraction inherently error-prone. Merged cells worsen this by causing popular libraries like pdfplumber and Camelot to misattribute text or generate phantom columns. The problem intensifies in multi-column page layouts, such as regulatory filings from DART, EDINET, and HKEX, where table coordinates from adjacent columns overlap. A two-stage approach — tracing explicit line segments first, then falling back to page-level whitespace gaps — can reduce extraction errors in bordered and borderless tables alike. For merged headers, a propagation heuristic that tags sub-columns as inherited from the spanning cell helps preserve correct attribution during downstream data processing.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in