job-copilot-api / parser.py
Musadiq7860's picture
initial backend for huggingface
fe099da
Raw
History Blame Contribute Delete
211 Bytes
import fitz
def extract_text_from_pdf(file_bytes: bytes) -> str:
doc = fitz.open(stream=file_bytes, filetype="pdf")
text = ""
for page in doc:
text += page.get_text()
return text.strip()