Spaces:
Running
Running
File size: 234 Bytes
f3f0a69 |
1 2 3 4 5 6 7 8 9 |
import fitz # PyMuPDF
def extract_text_from_pdf(pdf_file):
"""Extract text from a given PDF file."""
text = ""
with fitz.open(pdf_file) as doc:
for page in doc:
text += page.get_text()
return text |