Skip to content

Commit

Permalink
implement nurminen cont.' 2
Browse files Browse the repository at this point in the history
  • Loading branch information
BobLd committed Sep 22, 2020
1 parent 8b97c98 commit e4de67e
Show file tree
Hide file tree
Showing 5 changed files with 98 additions and 1,098 deletions.
22 changes: 21 additions & 1 deletion Tabula.Tests/TestsNurminenDetector.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
using Xunit;
using System;
using System.Collections.Generic;
using System.Text;
using Tabula.Detectors;
using Tabula.Extractors;
using UglyToad.PdfPig;
using Xunit;

namespace Tabula.Tests
{
Expand All @@ -7,7 +13,21 @@ public class TestsNurminenDetector
[Fact(Skip = "TO DO")]
public void TestLinesToCells()
{
using (PdfDocument document = PdfDocument.Open(@"test3.pdf", new ParsingOptions() { ClipPaths = true }))
{
ObjectExtractor oe = new ObjectExtractor(document);
PageArea page = oe.Extract(1);

SimpleNurminenDetectionAlgorithm detector = new SimpleNurminenDetectionAlgorithm();
var regions = detector.Detect(page);

foreach (var a in regions)
{
IExtractionAlgorithm ea = new BasicExtractionAlgorithm();
var newArea = page.GetArea(a.BoundingBox);
List<Table> tables = ea.Extract(newArea);
}
}
}
}
}
Loading

0 comments on commit e4de67e

Please sign in to comment.