PdfTableExtractor Class
Rebuilds a ruled table from a region of a page: the horizontal and vertical rules the page paints in the region make the grid, and the words of the text (PdfPage.ExtractTextLayout) fill its cells. When the table cannot be rebuilt, the result tells why (PdfTableExtractionFailureKind) instead of returning a wrong table.
public static class PdfTableExtractorRemarks
The rules are the segments of the stroked paths, the edges of their rectangles included, and the thin filled rectangles. A rule must cross the region to be a line of the grid: the outer border of the table is part of the grid. A word belongs to the cell its center is in.
Methods
| Name | Description |
|---|---|
| Extract(PdfPage, PdfRectangle, PdfTableExtractionOptions?) | Rebuilds the table of a region of a page. |
Extract(PdfPage, PdfRectangle, PdfTableExtractionOptions?)
PdfTableExtractor.csRebuilds the table of a region of a page.
public static PdfTableExtractionResult Extract(PdfPage page, PdfRectangle region, PdfTableExtractionOptions? options = null)Parameters
pagePdfPage- The page.
regionPdfRectangle- The region of the table, in default user space: the grid is looked for in it.
optionsPdfTableExtractionOptions?- The options, or
nullforPdfTableExtractionOptions.Default.
Returns
PdfTableExtractionResult The table, or the reason why it could not be rebuilt.
Exceptions
PdfException- The content of the page cannot be read.