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
↧
Unable to read PDF file and extract text
↧