Description
If a user uploads a scanned PDF or a document consisting of images, the standard text extraction libraries will fail, resulting in an empty or useless vector index.
Implementation
- Integrate an OCR library (e.g., Tesseract via
pytesseract or a cloud API like AWS Textract) into the document processing pipeline.
- Implement a check: if the standard PDF parser extracts very few text characters relative to the file size, automatically fall back to processing the pages as images through the OCR engine.
- Inform the user in the UI if OCR is being used, as it may take longer to process.
Level: Advanced
Affected Files: backend/parser.py, frontend/
Description
If a user uploads a scanned PDF or a document consisting of images, the standard text extraction libraries will fail, resulting in an empty or useless vector index.
Implementation
pytesseractor a cloud API like AWS Textract) into the document processing pipeline.Level: Advanced
Affected Files:
backend/parser.py,frontend/