From 89fb0bab735a434a0324c352012427bb97a66244 Mon Sep 17 00:00:00 2001 From: mike lorengo Date: Tue, 6 Aug 2024 08:09:17 -0700 Subject: [PATCH] Investigating [BUG] - Stream: Area detection hangs on PDF page #30 --- Tabula/Detectors/SimpleNurminenDetectionAlgorithm.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Tabula/Detectors/SimpleNurminenDetectionAlgorithm.cs b/Tabula/Detectors/SimpleNurminenDetectionAlgorithm.cs index e7bef85..25e9b44 100644 --- a/Tabula/Detectors/SimpleNurminenDetectionAlgorithm.cs +++ b/Tabula/Detectors/SimpleNurminenDetectionAlgorithm.cs @@ -230,7 +230,7 @@ public IReadOnlyList Detect(PageArea page) bool foundTable; - do + // do { foundTable = false; @@ -282,7 +282,10 @@ public IReadOnlyList Detect(PageArea page) tableAreas.Add(table); } } - } while (foundTable); + // removed following line. It's unclear how this code exit's the loop. When a table is found, + // there is nothing to advance to the next set of criteria, so a table will always be found. + // } while (foundTable); + } // create a set of our current tables that will eliminate duplicate tables SortedSet tableSet = new SortedSet(new TreeSetComparer());