Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
Corrected documentation to match 0.1.4
  • Loading branch information
EddyCwdry authored Dec 18, 2024
1 parent 3939143 commit 24f5f22
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,14 @@ NuGet packages available on the [releases](https://github.com/BobLd/tabula-sharp
```csharp
using (PdfDocument document = PdfDocument.Open("doc.pdf", new ParsingOptions() { ClipPaths = true }))
{
ObjectExtractor oe = new ObjectExtractor(document);
PageArea page = oe.Extract(1);
PageArea page = ObjectExtractor.Extract(document, 1);

// detect canditate table zones
SimpleNurminenDetectionAlgorithm detector = new SimpleNurminenDetectionAlgorithm();
var regions = detector.Detect(page);

IExtractionAlgorithm ea = new BasicExtractionAlgorithm();
List<Table> tables = ea.Extract(page.GetArea(regions[0].BoundingBox)); // take first candidate area
IReadOnlyList<Table> tables = ea.Extract(page.GetArea(regions[0].BoundingBox)); // take first candidate area
var table = tables[0];
var rows = table.Rows;
}
Expand All @@ -41,11 +40,10 @@ using (PdfDocument document = PdfDocument.Open("doc.pdf", new ParsingOptions() {
```csharp
using (PdfDocument document = PdfDocument.Open("doc.pdf", new ParsingOptions() { ClipPaths = true }))
{
ObjectExtractor oe = new ObjectExtractor(document);
PageArea page = oe.Extract(1);
PageArea page = ObjectExtractor.Extract(document, 1);

IExtractionAlgorithm ea = new SpreadsheetExtractionAlgorithm();
List<Table> tables = ea.Extract(page);
IReadOnlyList<Table> tables = ea.Extract(page);
var table = tables[0];
var rows = table.Rows;
}
Expand Down

0 comments on commit 24f5f22

Please sign in to comment.