File size: 207 Bytes
169c9db
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
import fitz  # PyMuPDF

def extract_text_from_pdf(file_path):
    text = ""
    with fitz.open(file_path) as pdf:
        for page in pdf:
            text += page.get_text()
    return text.strip()