mirror of
https://github.com/metafy-social/python-scripts.git
synced 2024-12-18 16:20:17 +00:00
7 lines
214 B
Python
7 lines
214 B
Python
import PyPDF2
|
|
pdfFileObject = open('sample.pdf', 'rb')
|
|
pdfReader = PyPDF2.PdfFileReader(pdfFileObject)
|
|
count = pdfReader.numPages
|
|
for i in range(count):
|
|
page = pdfReader.getPage(i)
|
|
print(page.extractText()) |