How patelakshar/lt2 works
PdfSolverMvc is an ASP.NET Core application for uploading engineering PDFs, extracting digital or scanned tables and datasheets, preserving strikethrough revisions and embedded images, then reviewing, correcting, and exporting results. The main flow runs from browser upload through controller-managed extraction and persistence to a details grid or CSV/XLSX output. The README documents four extraction modes and optional Gemini/Ollama paths; sampled code confirms key extraction, OCR, correction, and storage relationships. Some controller and extraction excerpts are incomplete, so unshown wiring is omitted.
Main entry points: PdfController.cs PDF controller · PdfExtractionService.cs Extraction orchestrator · ExportService.cs Export service · AppDbContext.cs SQLite context
Components 21
Web workflow
- PDF controller
PdfSolverMvc/Controllers/PdfController.cs - Upload page
PdfSolverMvc/Views/Pdf/Upload.cshtml - Details grid
PdfSolverMvc/Views/Pdf/Details.cshtml - Registry list
PdfSolverMvc/Views/Pdf/Index.cshtml
Extraction engines
- Extraction orchestrator
PdfSolverMvc/Services/PdfExtractionService.cs - PDF grid reader
PdfSolverMvc/Services/PdfPigGridExtractor.cs - Datasheet reader
PdfSolverMvc/Services/PdfDatasheetExtractor.cs - Grid selection
PdfSolverMvc/Services/PdfGridExtractor.cs - Strike detection
PdfSolverMvc/Services/PdfPigStrikethroughService.cs - Local OCR
PdfSolverMvc/Services/PaddleLocalService.cs - Scan verification
PdfSolverMvc/Services/OpenCvVerificationService.cs - Gemini extraction
PdfSolverMvc/Services/GeminiService.cs - Local vision model
PdfSolverMvc/Services/LocalLlmVlmService.cs
Review and correction
- Correction memory
PdfSolverMvc/Services/CorrectionMemoryService.cs - Extraction progress
PdfSolverMvc/Services/ExtractionProgressTracker.cs
Persistence and exports
- PDF records
PdfSolverMvc/Models/PdfDocumentRecord.cs - SQLite context
PdfSolverMvc/Data/AppDbContext.cs - Export service
PdfSolverMvc/Services/ExportService.cs - CSV exporter
PdfSolverMvc/Services/CsvExportService.cs - Excel exporter
PdfSolverMvc/Services/ExcelExportService.cs
Other components
- Browser user
Connections 23
- Browser user → Upload page: opens upload
README.md - Upload page → PDF controller: submits PDF
README.md - PDF controller → Extraction orchestrator: starts extraction
PdfSolverMvc/Controllers/PdfController.cs - Extraction orchestrator → Grid selection: selects grid reader
PdfSolverMvc/Services/PdfExtractionService.cs - Grid selection → PDF grid reader: delegates grids
PdfSolverMvc/Services/PdfGridExtractor.cs - PDF grid reader → Datasheet reader: uses datasheet logic
PdfSolverMvc/Services/PdfPigGridExtractor.cs - Extraction orchestrator → Strike detection: detects revisions
PdfSolverMvc/Services/PdfExtractionService.cs - Extraction orchestrator → Local OCR: runs scanned OCR
PdfSolverMvc/Services/PdfExtractionService.cs - Local OCR → Scan verification: analyzes scans
PdfSolverMvc/Services/PaddleLocalService.cs - Extraction orchestrator → Gemini extraction: requests AI fallback
PdfSolverMvc/Services/PdfExtractionService.cs - Extraction orchestrator → Local vision model: requests local AI
PdfSolverMvc/Services/PdfExtractionService.cs - PDF controller → Extraction progress: updates job status
PdfSolverMvc/Controllers/PdfController.cs - Extraction orchestrator → Extraction progress: reports progress
PdfSolverMvc/Services/PdfExtractionService.cs - PDF controller → SQLite context: loads and saves
PdfSolverMvc/Controllers/PdfController.cs - SQLite context → PDF records: stores records
PdfSolverMvc/Data/AppDbContext.cs - PDF controller → Correction memory: applies corrections
PdfSolverMvc/Controllers/PdfController.cs - Correction memory → SQLite context: reads rules
PdfSolverMvc/Services/CorrectionMemoryService.cs - PDF controller → Details grid: renders details
README.md - PDF controller → Registry list: renders registry
README.md - PDF controller → Export service: requests exports
PdfSolverMvc/Controllers/PdfController.cs - Export service → CSV exporter: delegates CSV
PdfSolverMvc/Services/ExportService.cs - PDF controller → Excel exporter: creates XLSX
PdfSolverMvc/Controllers/PdfController.cs - Export service → Excel exporter: provides workbook logic
PdfSolverMvc/Services/ExcelExportService.cs