py-pdf/pypdf

Ligature issue when converting PDF to text

開放

#1,351 建立於 2022年9月16日

 (6 則留言) (3 個反應) (0 位負責人)Python (1,258 個分叉)batch import
help wantedis-bugworkflow-text-extraction

倉庫指標

星標
 (6,413 顆星)
PR 合併指標
 (平均合併 8天) (30 天內合併 49 個 PR)

描述

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

貢獻者指南