Extract Tables from a PDF in C# — What Works and What Doesn't (.NET, No Python)
Автор: Tech with Aditya Mangal
Загружено: 2026-09-03
Просмотров: 52
Описание:
Getting text out of a PDF in .NET is easy. Getting the TABLE out — as rows and columns — is the genuinely hard problem, and it's where .NET is honestly weaker than Python. There's no turnkey document-VLM you can call in one line. So in 72 seconds I show what you CAN do: reconstruct the table geometrically from word coordinates — how well it works on a clean PDF, and exactly where it breaks. All in C# on .NET 10, no cloud.
🧩 THE TECHNIQUE A table isn't stored as a table — it's implicit in the position of each word. So you rebuild it: • Rows — cluster words that share a vertical position • Columns — snap each word to the nearest header column
No model. Milliseconds. Deterministic.
✅ WHAT WORKS • Born-digital PDFs (PdfPig word boxes) → all four columns rebuilt exactly, "3.5" intact
⚠️ WHAT DOESN'T • Totals and footer rows aren't part of the grid — they collapse into the last column • Merged cells, multi-line cells, borderless tables, several tables on a page • Scanned tables add OCR error on top (DPI-dependent) • No turnkey VLM-style table extractor in .NET — that's still Python's edge
⏱️ CHAPTERS 0:00 PDFs don't store tables 0:15 Part one — cluster, then snap 0:33 Part two — it works 0:46 Part three — it breaks 0:59 Pick by your documents
📄 Full write-up with the code (Medium): / i-tried-extracting-tables-from-pdfs-in-c-h...
I'm Aditya Mangal, a Senior AI Engineer. Part of a hands-on series on running OCR locally in .NET — no Python, no cloud, every number measured first-hand on one laptop.
👉 How are you extracting tables in .NET? 👇
#csharp #dotnet #pdf #ocr #documentai
Повторяем попытку...
Доступные форматы для скачивания:
Скачать видео
-
Информация по загрузке: