Skip to content

[Feature] Add Optical Character Recognition (OCR) Fallback for Scanned PDFs #826

Description

@knoxiboy

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

  1. Integrate an OCR library (e.g., Tesseract via pytesseract or a cloud API like AWS Textract) into the document processing pipeline.
  2. 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.
  3. 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/

Metadata

Metadata

Assignees

No one assigned

    Labels

    gssocGirlScript Summer of Code 2026 issue/PR

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions