fix:build docreader timeout; update ocr config;support pdf tables parsing

main
Liwx1014 2025-09-03 11:40:29 +08:00 committed by lyingbug
parent eb27a30c41
commit 88b467caf0
1 changed files with 7 additions and 0 deletions

View File

@ -82,3 +82,10 @@ class PDFParser(BaseParser):
except Exception as e:
logger.error(f"Failed to parse PDF document: {str(e)}")
return ""
finally:
if os.path.exists(temp_pdf_path):
try:
os.remove(temp_pdf_path)
logger.info(f"Temporary file cleaned up: {temp_pdf_path}")
except OSError as e:
logger.error(f"Error removing temporary file {temp_pdf_path}: {e}")