mirror of
https://github.com/metafy-social/python-scripts.git
synced 2024-11-30 15:31:10 +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())
|