TableExtractor Class
Extracts tables from input document streams and serializes the extraction result to JSON. Provides both synchronous and asynchronous extraction methods.
Inheritance
System.Object
TableExtractor
Namespace: Syncfusion.SmartTableExtractor
Assembly: Syncfusion.SmartTableExtractor.Base.dll
Syntax
public class TableExtractor : Object
Constructors
TableExtractor()
Declaration
public TableExtractor()
Properties
TableExtractionOptions
Configuration controlling table detection and extraction behavior.
Declaration
public TableExtractionOptions TableExtractionOptions { get; set; }
Property Value
| Type |
|---|
| TableExtractionOptions |
Methods
ExtractTableAsJson(Stream)
Declaration
public string ExtractTableAsJson(Stream stream)
Parameters
| Type | Name | Description |
|---|---|---|
| System.IO.Stream | stream |
Returns
| Type |
|---|
| System.String |
ExtractTableAsJsonAsync(Stream, CancellationToken)
Declaration
public Task<string> ExtractTableAsJsonAsync(Stream inputStream, CancellationToken cancellationToken = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.IO.Stream | inputStream | |
| System.Threading.CancellationToken | cancellationToken |
Returns
| Type |
|---|
| System.Threading.Tasks.Task<System.String> |
ExtractTableAsMarkdown(Stream)
Extracts structured table and returns a structured Syncfusion.Office.Markdown.MarkdownDocument. This runs the same OCR/detection pipeline and returns a best-effort Markdown DOM.
Declaration
public string ExtractTableAsMarkdown(Stream inputStream)
Parameters
| Type | Name | Description |
|---|---|---|
| System.IO.Stream | inputStream |
Returns
| Type |
|---|
| System.String |
ExtractTableAsMarkdownAsync(Stream, CancellationToken)
Asynchronously extracts structured table and returns a Markdown string.
Declaration
public Task<string> ExtractTableAsMarkdownAsync(Stream inputStream, CancellationToken cancellationToken = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.IO.Stream | inputStream | A readable stream containing an image or PDF. |
| System.Threading.CancellationToken | cancellationToken | Token to observe while waiting for the task to complete. |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<System.String> | A task whose result is a Markdown string representing extracted content. |