You're seeing this error when trying to open a PDF file in the Archive directory.
The file has a .pdf extension but is actually a plain text file (not a real PDF).
- Open LibraDigit AI
- Go to "Upload & OCR"
- Upload the problematic file
- The system will automatically detect it's a text file and extract the content
- Continue with the normal workflow
cd backend
python convert_text_to_pdf.py "Archive/"This will:
- Scan all files in the Archive directory
- Find text files with
.pdfextensions - Convert them to proper PDF documents
- Skip files that are already valid PDFs
Text File Signs:
- Very small file size (e.g., 92 bytes)
- Can be opened in Notepad
- Shows plain text when opened
Real PDF Signs:
- Larger file size (typically 1KB+)
- Opens in PDF readers
- Shows formatted content
Before:
File: Latha_2025_Veterinary Clinic.pdf
Size: 92 bytes
Type: Text file
Status: ❌ Error
After Conversion:
File: Latha_2025_Veterinary Clinic.pdf
Size: 1,822 bytes
Type: Valid PDF
Status: ✅ Works!
See detailed documentation:
HANDLING_TEXT_PDF_FILES.md- Complete guidebackend/CONVERT_TEXT_TO_PDF.md- Conversion tool docsREADME.md- Main documentation