#4130·pypdf

extract_text() drops the wrapped second line of a table cell since 6.16.2 (regression from 6.16.1)

Author: kgfbabyCreated Sep 26, 2026Updated Sep 28, 2026
Labelsworkflow-text-extraction

Environment: Python 3.10.12 (also reproduced on 3.14 with the library as the only variable), Linux aarch64. pypdf installed with --no-deps into separate target directories; same file, same code.

Code

python
import pypdf
r = pypdf.PdfReader("nco2007-page2.pdf")
print(pypdf.__version__, [l for l in r.pages[0].extract_text().splitlines() if "Kapahulu" in l])

Expected (6.15.0, 6.16.0, 6.16.1):

6.16.1 ['5 Diamond Head/Kapahulu/St.Louis Heights']

Actual (6.16.2, 6.17.0, 6.18.0, 6.19.0):

6.16.2 ['5 Diamond Head/Kapahulu/St.']

The cell prints Diamond Head/Kapahulu/St. Louis Heights wrapped over two lines; from 6.16.2 the second line (Louis Heights) is no longer emitted anywhere in the page's text. Bisected on this page: 6.15.0 full · 6.16.0 full · 6.16.1 full · 6.16.2 cut · 6.17.0 cut · 6.18.0 cut · 6.19.0 cut.

Also observed (probably intended, mentioned for context): from 6.16.2 a space is inserted between tokens that earlier versions glued (Dolores1855 → Dolores 1855) across several other documents in the same series. We are not reporting that as a bug.

Workaround: pinned to 6.15.0.

File: one page extracted from the City and County of Honolulu's public 2007 Neighborhood Board results PDF (attached below); the one-page file reproduces on its own (6.16.1 full, 6.16.2 cut).

wq1407-nco2007-page2.pdf