File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -24,15 +24,14 @@ NuGet packages available on the [releases](https://github.com/BobLd/tabula-sharp
24
24
``` csharp
25
25
using (PdfDocument document = PdfDocument .Open (" doc.pdf" , new ParsingOptions () { ClipPaths = true }))
26
26
{
27
- ObjectExtractor oe = new ObjectExtractor (document );
28
- PageArea page = oe .Extract (1 );
27
+ PageArea page = ObjectExtractor .Extract (document , 1 );
29
28
30
29
// detect canditate table zones
31
30
SimpleNurminenDetectionAlgorithm detector = new SimpleNurminenDetectionAlgorithm ();
32
31
var regions = detector .Detect (page );
33
32
34
33
IExtractionAlgorithm ea = new BasicExtractionAlgorithm ();
35
- List < Table > tables = ea .Extract (page .GetArea (regions [0 ].BoundingBox )); // take first candidate area
34
+ IReadOnlyList < Table > tables = ea .Extract (page .GetArea (regions [0 ].BoundingBox )); // take first candidate area
36
35
var table = tables [0 ];
37
36
var rows = table .Rows ;
38
37
}
@@ -41,11 +40,10 @@ using (PdfDocument document = PdfDocument.Open("doc.pdf", new ParsingOptions() {
41
40
``` csharp
42
41
using (PdfDocument document = PdfDocument .Open (" doc.pdf" , new ParsingOptions () { ClipPaths = true }))
43
42
{
44
- ObjectExtractor oe = new ObjectExtractor (document );
45
- PageArea page = oe .Extract (1 );
43
+ PageArea page = ObjectExtractor .Extract (document , 1 );
46
44
47
45
IExtractionAlgorithm ea = new SpreadsheetExtractionAlgorithm ();
48
- List < Table > tables = ea .Extract (page );
46
+ IReadOnlyList < Table > tables = ea .Extract (page );
49
47
var table = tables [0 ];
50
48
var rows = table .Rows ;
51
49
}
You can’t perform that action at this time.
0 commit comments