py-pdf/pypdf

Ligature issue when converting PDF to text

Open

#1,351 opened on Sep 16, 2022

 (6 comments) (3 reactions) (0 assignees)Python (1,258 forks)batch import
help wantedis-bugworkflow-text-extraction

Repository metrics

Stars
 (6,413 stars)
PR merge metrics
 (Avg merge 8d) (49 merged PRs in 30d)

Description

I am having a ligature issue with this PDF. 'fi', 'fl' and 'ff' characters are returning NULL

#598 is similar to this issue.

MVCE: Code + PDF

from PyPDF2 import PdfReader

reader = PdfReader("Inspection_redacted.pdf")
for page in reader.pages:
    print(page.extract_text())

PDF

Contributor guide