Spaces:
Sleeping
Sleeping
File size: 348 Bytes
cb1f2f8 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | import PyPDF2
class Loader:
"""
loads the text from the pdf files
"""
def __init__(self,file_path):
self.file = file_path
def load(self):
reader = PyPDF2.PdfReader(self.file)
text = ""
for page in reader.pages:
text = text + page.extract_text()
return text |