def input_pdf_text(uploaded_file):
# Open the PDF file in binary mode
with uploaded_file as file:
# Create a PdfReader object to read the PDF
reader = pdf.PdfReader(file)
text=""
Loop through each page and extract text
for page in reader(len(reader.pages)):
page=reader.pages[page]
text+= str(page.extract_text())
return text
It is suppose to read the uploaded file and extract text
New contributor
Abinash Das is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.