feat: Add layout complexity detection (tables and multi-column)

Add LayoutComplexity struct to PdfProcessResult so callers can detect
when a PDF has complex layout (tables or multi-column text) and decide
whether to use the extracted markdown or fall back to OCR.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Abimael Martell
2026-02-18 20:38:50 -08:00
co-authored by Claude Opus 4.6
parent 0cf80025f6
commit e62444fee0
5 changed files with 160 additions and 19 deletions
+1
View File
@@ -948,6 +948,7 @@ fn test_pages_needing_ocr_field_accessible() {
pages_needing_ocr: vec![1, 3],
title: None,
confidence: 1.0,
layout: pdf_inspector::LayoutComplexity::default(),
};
assert_eq!(process_result.pages_needing_ocr, vec![1, 3]);
}