Incorrect extraction in tables with overlapping columns

Author: gnadlrCreated Jun 22, 2023Updated Aug 5, 2026

This is a continuation of a discussion posted here, please check for more info.

Describe the bug

When the pdf has overlapping columns (i.e the columns do not wrap text), all extraction methods (extract_tables, extract_text, extract_words) give incorrect result.

  • When using extract_tables() or extract_text(), the 1st column is truncated at the separator line, the rest of the 1st column overlap alternatively with the 2nd column.
  • When using extract_words(use_text_flow=True), the last word of the 1st column (starting after the last space, or the entire cell if there is no space) is joined with the 2nd column

Original text

'aaaa b|bbb' and '1111' (the | is the separator line between the columns)

Expected behavior

'aaaa bbbb' and '1111'

Actual behavior

'aaaa b' and 'b1b1b11' when using extract_tables() or extract_text()

'aaaa' and 'bbbb1111'. when using extract_words(use_text_flow=True)

Sample pdf

https://github.com/jsvine/pdfplumber/files/11782271/sample.2.pdf