Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 14271

Unable to read PDF file and extract text

$
0
0
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

Viewing all articles
Browse latest Browse all 14271

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>