feat(documents): add text pdf ingestion with heading reconstruction
Why: - Support Text PDFs in the same DocumentTree/markdown contract as DOCX. Changes: - PyMuPDF parser, text-layer gate, shared heading heuristics, upload dispatch for .pdf. Impact: - Scanned/image PDFs are rejected at upload; requires pymupdf installed. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -35,5 +35,9 @@ class Settings(BaseSettings):
|
||||
# Database
|
||||
database_url: str = "sqlite:///./data/chunking_benchmark.db"
|
||||
|
||||
# Text PDF gate (reject Scanned PDFs with near-empty text layer)
|
||||
pdf_min_total_chars: int = 100
|
||||
pdf_min_median_chars_per_page: int = 40
|
||||
|
||||
|
||||
settings = Settings()
|
||||
Reference in New Issue
Block a user