py-pdf/pypdf

Ligature issue when converting PDF to text

Aperta

#1351 aperta il 16 set 2022

 (6 commenti) (3 reazioni) (0 assegnatari)Python (1258 fork)batch import
help wantedis-bugworkflow-text-extraction

Metriche repository

Star
 (6413 stelle)
Metriche merge PR
 (Merge medio 8g) (49 PR mergiate in 30 g)

Descrizione

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

Guida contributor