← back to articles

❯ cat python-pdf-to-text.md

Python Pdf to Text

1 min readtr#Python
import PyPDF2

FILE_PATH = 'Pdf Path'

with open(FILE_PATH, mode='rb') as f:
    reader = PyPDF2.PdfFileReader(f)
    page = reader.getPage(0)
    print(page.extractText())