Spaces:
Sleeping
Sleeping
File size: 357 Bytes
cc739fc | 1 2 3 4 5 6 7 8 9 10 11 | import pdfplumber
def extract_text_from_pdf(file_path: str) -> str:
if file_path is None:
return ""
try:
with pdfplumber.open(file_path) as pdf:
pages = [page.extract_text() or "" for page in pdf.pages]
return "\n".join(pages).strip()
except Exception as e:
return f"Chyba při čtení PDF: {str(e)}" |