fix: improve Office document processing with Direct track
- Force Office documents (PPTX, DOCX, XLSX) to use Direct track after LibreOffice conversion, since converted PDFs always have extractable text - Fix PDF generator to not exclude text in image regions for Direct track, allowing text to render on top of background images (critical for PPT) - Increase file_type column from VARCHAR(50) to VARCHAR(100) to support long MIME types like PPTX - Remove reference to non-existent total_images metadata attribute This significantly improves processing time for Office documents (from ~170s OCR to ~10s Direct) while preserving text quality. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -1317,8 +1317,6 @@ class DirectExtractionEngine:
|
||||
doc.close()
|
||||
|
||||
if images_added > 0:
|
||||
current_images = unified_doc.metadata.total_images or 0
|
||||
unified_doc.metadata.total_images = current_images + images_added
|
||||
logger.info(f"Added {images_added} inline image regions to document")
|
||||
|
||||
except Exception as e:
|
||||
|
||||
Reference in New Issue
Block a user