File size: 248 Bytes
9d21edd
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
import pdfplumber

def extract_text_from_pdf(path):
    text = ""
    with pdfplumber.open(path) as pdf:
        for page in pdf.pages:
            if page.extract_text():
                text += page.extract_text() + "\n"
    return text