diff --git a/Document-Processing/Data-Extraction/NET/conversions/overview.md b/Document-Processing/Data-Extraction/NET/conversions/overview.md index 02cbf0e46d..8b4148e6f6 100644 --- a/Document-Processing/Data-Extraction/NET/conversions/overview.md +++ b/Document-Processing/Data-Extraction/NET/conversions/overview.md @@ -1,10 +1,10 @@ --- title: Smart Data Extractor Library | Syncfusion -description: Smart Data Extractor converts PDF documents and images to structured formats like JSON, Markdown (MD), and PDF output. +description: Smart Data Extractor converts PDF documents and images to structured formats like JSON, Markdown (MD), and PDF output. platform: document-processing control: SmartDataExtractor documentation: UG -keywords: Assemblies +keywords: SmartDataExtractor, PDF to JSON, PDF to Markdown --- # Welcome to Syncfusion® Smart Data Extractor Library diff --git a/Document-Processing/Data-Extraction/NET/conversions/pdf-to-json.md b/Document-Processing/Data-Extraction/NET/conversions/pdf-to-json.md index 0af99d01d6..cdc6458ab3 100644 --- a/Document-Processing/Data-Extraction/NET/conversions/pdf-to-json.md +++ b/Document-Processing/Data-Extraction/NET/conversions/pdf-to-json.md @@ -20,7 +20,7 @@ Refer to the following links for the assemblies and NuGet packages required on d ## Extract Data as JSON from PDF or Image -To extract form fields across a PDF document using the [ExtractDataAsJson](https://help.syncfusion.com/cr/document-processing/Syncfusion.SmartDataExtractor.DataExtractor.html#Syncfusion_SmartDataExtractor_DataExtractor_ExtractDataAsJson_System_IO_Stream_) method of the [DataExtractor](https://help.syncfusion.com/cr/document-processing/Syncfusion.SmartDataExtractor.DataExtractor.html) class, refer to the following code example: +To extract structured data from a PDF document or image using the [ExtractDataAsJson](https://help.syncfusion.com/cr/document-processing/Syncfusion.SmartDataExtractor.DataExtractor.html#Syncfusion_SmartDataExtractor_DataExtractor_ExtractDataAsJson_System_IO_Stream_) method of the [DataExtractor](https://help.syncfusion.com/cr/document-processing/Syncfusion.SmartDataExtractor.DataExtractor.html) class, refer to the following code example: {% tabs %} @@ -28,10 +28,9 @@ To extract form fields across a PDF document using the [ExtractDataAsJson](https using System.IO; using Syncfusion.SmartDataExtractor; -using Syncfusion.SmartFormRecognizer; using System.Text; -//Open the input PDF file as a stream. +//Open the input PDF or image file as a stream. using (FileStream stream = new FileStream("Input.pdf", FileMode.Open, FileAccess.Read)) { //Initialize the Data Extractor. @@ -48,10 +47,9 @@ using (FileStream stream = new FileStream("Input.pdf", FileMode.Open, FileAccess using System.IO; using Syncfusion.SmartDataExtractor; -using Syncfusion.SmartFormRecognizer; using System.Text; -//Open the input PDF file as a stream. +//Open the input PDF or image file as a stream. using (FileStream stream = new FileStream("Input.pdf", FileMode.Open, FileAccess.Read)) { //Initialize the Data Extractor. @@ -96,7 +94,6 @@ using (FileStream stream = new FileStream("Input.pdf", FileMode.Open, FileAccess File.WriteAllText("Output.json", data, Encoding.UTF8); } - {% endhighlight %} {% highlight c# tabtitle="C# [Windows-specific]" %} diff --git a/Document-Processing/Data-Extraction/NET/conversions/pdf-to-markdown.md b/Document-Processing/Data-Extraction/NET/conversions/pdf-to-markdown.md index 5f7da60e16..061f4d88ef 100644 --- a/Document-Processing/Data-Extraction/NET/conversions/pdf-to-markdown.md +++ b/Document-Processing/Data-Extraction/NET/conversions/pdf-to-markdown.md @@ -13,14 +13,14 @@ Markdown is a lightweight markup language that adds formatting elements to plain ## Assemblies and NuGet packages required -Refer to the following links for assemblies and NuGet packages required based on platforms to Extract data as Markdown file using the .NET Word Library (DocIO). +Refer to the following links for the assemblies and NuGet packages required based on your target platform to extract data as a Markdown file using the Syncfusion® Smart Data Extractor library. * [PDF to Markdown Extraction assemblies](/document-processing/data-extraction/net/Assemblies-required) * [PDF to Markdown Extraction NuGet packages](/document-processing/data-extraction/net/Nuget-packages-required) ## Extract Data as Markdown from PDF or Image -To extract form fields across a PDF document using the [ExtractDataAsMarkdown](https://help.syncfusion.com/cr/document-processing/Syncfusion.SmartDataExtractor.DataExtractor.html#Syncfusion_SmartDataExtractor_DataExtractor_ExtractDataAsMarkdown_System_IO_Stream_) method of the [DataExtractor](https://help.syncfusion.com/cr/document-processing/Syncfusion.SmartDataExtractor.DataExtractor.html) class, refer to the following code example: +To extract structured data from a PDF document or image using the [ExtractDataAsMarkdown](https://help.syncfusion.com/cr/document-processing/Syncfusion.SmartDataExtractor.DataExtractor.html#Syncfusion_SmartDataExtractor_DataExtractor_ExtractDataAsMarkdown_System_IO_Stream_) method of the [DataExtractor](https://help.syncfusion.com/cr/document-processing/Syncfusion.SmartDataExtractor.DataExtractor.html) class, refer to the following code example: {% tabs %} @@ -30,7 +30,7 @@ using System.IO; using Syncfusion.SmartDataExtractor; using System.Text; -//Open the input PDF file as a stream. +//Open the input PDF or image file as a stream. using (FileStream stream = new FileStream("Input.pdf", FileMode.Open, FileAccess.Read)) { //Initialize the Data Extractor. @@ -70,7 +70,7 @@ You can download a complete working sample from [GitHub](https://github.com/Sync ## Extract a specific page to Markdown -The following code demonstrates how to use the [ExtractDataAsMarkdown](https://help.syncfusion.com/cr/document-processing/Syncfusion.SmartDataExtractor.DataExtractor.html#Syncfusion_SmartDataExtractor_DataExtractor_ExtractDataAsMarkdown_System_IO_Stream_) method of the [DataExtractor](https://help.syncfusion.com/cr/document-processing/Syncfusion.SmartDataExtractor.DataExtractor.html) class to extract content from a selected page in a PDF and save it as a Markdown file by specifying its page index. +The following code demonstrates how to use the [ExtractDataAsMarkdown](https://help.syncfusion.com/cr/document-processing/Syncfusion.SmartDataExtractor.DataExtractor.html#Syncfusion_SmartDataExtractor_DataExtractor_ExtractDataAsMarkdown_System_IO_Stream_) method of the [DataExtractor](https://help.syncfusion.com/cr/document-processing/Syncfusion.SmartDataExtractor.DataExtractor.html) class to extract content from a selected page in a PDF and save it as a Markdown file by specifying its page index. Page numbers are 1-based and the range is inclusive. {% tabs %} @@ -121,7 +121,7 @@ using (FileStream stream = new FileStream("Input.pdf", FileMode.Open, FileAccess ## Extract a range of pages to Markdown -The following code demonstrates how to use the [ExtractDataAsMarkdown](https://help.syncfusion.com/cr/document-processing/Syncfusion.SmartDataExtractor.DataExtractor.html#Syncfusion_SmartDataExtractor_DataExtractor_ExtractDataAsMarkdown_System_IO_Stream_) method of the [DataExtractor](https://help.syncfusion.com/cr/document-processing/Syncfusion.SmartDataExtractor.DataExtractor.html) class to extract content from a range of pages in a PDF and save it as a Markdown file by specifying the page range. +The following code demonstrates how to use the [ExtractDataAsMarkdown](https://help.syncfusion.com/cr/document-processing/Syncfusion.SmartDataExtractor.DataExtractor.html#Syncfusion_SmartDataExtractor_DataExtractor_ExtractDataAsMarkdown_System_IO_Stream_) method of the [DataExtractor](https://help.syncfusion.com/cr/document-processing/Syncfusion.SmartDataExtractor.DataExtractor.html) class to extract content from a range of pages in a PDF and save it as a Markdown file by specifying the page range. Page numbers are 1-based and the range is inclusive. {% tabs %} @@ -171,7 +171,7 @@ using (FileStream stream = new FileStream("Input.pdf", FileMode.Open, FileAccess ## Customize image saving -The [ImageNodeVisited](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.SaveOptions.html#Syncfusion_DocIO_DLS_SaveOptions_ImageNodeVisited) event in the [SaveOptions](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.SaveOptions.html) class (from the Syncfusion® DocIO library, used within Smart Data Extractor) allows control over how images are handled when generating a Markdown string. With this event, you can: +The [ImageNodeVisited](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.SaveOptions.html#Syncfusion_DocIO_DLS_SaveOptions_ImageNodeVisited) event in the [SaveOptions](https://help.syncfusion.com/cr/document-processing/Syncfusion.DocIO.DLS.SaveOptions.html) class (from the Syncfusion® DocIO library, used within Smart Data Extractor) allows control over how images are handled when generating a Markdown string. Create the output image folder before writing files. With this event, you can: * Customize image names and storage paths, and save images externally using a FileStream. * Replace Base64 content with a file path or URL for optimized storage and cloud reference. diff --git a/Document-Processing/Data-Extraction/NET/data-extractor-overview.md b/Document-Processing/Data-Extraction/NET/data-extractor-overview.md index 029bd5d74e..fe20730c55 100644 --- a/Document-Processing/Data-Extraction/NET/data-extractor-overview.md +++ b/Document-Processing/Data-Extraction/NET/data-extractor-overview.md @@ -26,4 +26,4 @@ keywords: Assemblies {% enddoccards %} -The .NET **Smart Data Extractor** is a robust, deterministic C# library built to capture complete document structures from PDFs and images. Optimized for .NET workflows, it interprets visual layout patterns—lines, boxes, labels, and alignment—to accurately identify and extract *tables, text blocks, images, headers, footers, and form fields*. Each extracted element includes per‑field confidence scores, enabling precise validation, seamless export, and smooth integration into applications. \ No newline at end of file +The .NET **Smart Data Extractor** extracts structured document content from PDFs and images. It interprets visual layout patterns—lines, boxes, labels, and alignment—to identify and extract *tables, text blocks, images, headers, footers, and form fields*. Each extracted element includes per‑field confidence scores for validation, export, and integration. See the [Conversions overview](NET/conversions/overview.md) for JSON, Markdown, and fillable PDF extraction. \ No newline at end of file diff --git a/Document-Processing/Data-Extraction/NET/how-to-download-and-install.md b/Document-Processing/Data-Extraction/NET/how-to-download-and-install.md index 6890bfbbda..34ae9298cc 100644 --- a/Document-Processing/Data-Extraction/NET/how-to-download-and-install.md +++ b/Document-Processing/Data-Extraction/NET/how-to-download-and-install.md @@ -15,11 +15,9 @@ The Syncfusion® Data Extraction Add-On can be downloaded from the ### Download Data Extraction Add-On Setup -1. You can evaluate our Data Extraction Add-On by visiting the [Download](https://www.syncfusion.com/downloads) page and selecting the product. -2. An unlock key is not required to download the Syncfusion® Data Extraction Add-On. -3. You can download the Data Extraction Add-On at any time from your registered account’s [Trials & Downloads](https://www.syncfusion.com/account/manage-trials/downloads) page by clicking the More Download Options (as shown in the screenshot below). -![Trial and downloads of Syncfusion SmartDataExtractor](images/license-download.png) -4. The Syncfusion Data Extraction Add-On is provided in ZIP format. After downloading, extract the file to access assemblies and demos for PDF and image data extraction. - ![License and downloads of Syncfusion SmartDataExtractor](images/start-trial-download-offline-installer.png) +1. You can download the Data Extraction Add-On at any time from your registered account's [Trials & Downloads](https://www.syncfusion.com/account/manage-trials/downloads) page by clicking **More Download Options** (as shown in the screenshot below). + ![Trials and downloads of the Syncfusion Data Extraction Add-On](images/license-download.png) +2. The Syncfusion Data Extraction Add-On is provided in ZIP format. After downloading, extract the file to access the assemblies and demos for PDF and image data extraction. + ![Extracted contents of the Syncfusion Data Extraction Add-On ZIP](images/start-trial-download-offline-installer.png) N> The Syncfusion Data Extraction Add‑On is available in ZIP format for Windows, Linux, and Mac. Extract the file to access the assemblies and demos for PDF or image data extraction. \ No newline at end of file diff --git a/Document-Processing/Data-Extraction/NET/overview.md b/Document-Processing/Data-Extraction/NET/overview.md index a18c3874aa..9b942a6347 100644 --- a/Document-Processing/Data-Extraction/NET/overview.md +++ b/Document-Processing/Data-Extraction/NET/overview.md @@ -1,7 +1,7 @@ --- title: Extract Structured Data in .NET | Syncfusion canonical_url: "https://www.syncfusioninternal.com/document-sdk/net-pdf-data-extraction" -description: Syncfusion® Data Extraction is a .NET library that extracts tables, forms, text, and images from documents, outputing PDFs and JSON. +description: Syncfusion® Data Extraction is a .NET library that extracts tables, forms, text, and images from PDF documents. platform: document-processing control: DataExtraction documentation: UG @@ -219,7 +219,7 @@ The Cell Object represents an individual table entry, containing text values, sp #### FormObjects -FormObjects represent interactive form fields detected on the page, such as text boxes, checkboxes, radio buttons, and signature regions.Each object includes positional data, dimensions, field type, and a confidence score that indicates detection reliability. +FormObjects represent interactive form fields detected on the page, such as text boxes, checkboxes, radio buttons, and signature regions. Each object includes positional data, dimensions, field type, and a confidence score that indicates detection reliability. diff --git a/Document-Processing/Data-Extraction/NET/working-with-data-extraction.md b/Document-Processing/Data-Extraction/NET/working-with-data-extraction.md index c8fae40cae..de87dbc124 100644 --- a/Document-Processing/Data-Extraction/NET/working-with-data-extraction.md +++ b/Document-Processing/Data-Extraction/NET/working-with-data-extraction.md @@ -6,7 +6,7 @@ control: SmartDataExtractor documentation: UG keywords: Assemblies ---- +--- # Working with Data Extraction @@ -277,7 +277,7 @@ using (FileStream inputStream = new FileStream("Input.pdf", FileMode.Open, FileA DataExtractor extractor = new DataExtractor(); //Extract data and return as a loaded PDF document. PdfLoadedDocument document = extractor.ExtractDataAsPdfDocument(inputStream); - //Save the extracted output as a new json file. + //Save the extracted output as a new PDF file. document.Save("Output.pdf"); //Close the document. document.Close(true); @@ -413,7 +413,7 @@ using (FileStream stream = new FileStream("Input.pdf", FileMode.Open, FileAccess You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/PDF-Examples/tree/master/Data-Extraction/Smart-Data-Extractor/Disable-Form-detection/.NET). -## Disable Table detection +## Disable Table Detection To disable table detection while extracting structured data from a PDF document using the [ExtractDataAsJson](https://help.syncfusion.com/cr/document-processing/Syncfusion.SmartDataExtractor.DataExtractor.html#Syncfusion_SmartDataExtractor_DataExtractor_ExtractDataAsJson_System_IO_Stream_) method of the [DataExtractor](https://help.syncfusion.com/cr/document-processing/Syncfusion.SmartDataExtractor.DataExtractor.html) class, refer to the following code example: diff --git a/Document-Processing/Data-Extraction/NET/working-with-form-recognition.md b/Document-Processing/Data-Extraction/NET/working-with-form-recognition.md index a68a71e331..4b886379b7 100644 --- a/Document-Processing/Data-Extraction/NET/working-with-form-recognition.md +++ b/Document-Processing/Data-Extraction/NET/working-with-form-recognition.md @@ -1,6 +1,6 @@ --- title: Working with Form Recognition | Syncfusion® -description: Learn how to recognize forms and configure FormRecognizeOptions in Syncfusion® SmartFormRecognizer to detect and process form elements easily. +description: Learn how to recognize forms and configure FormRecognizeOptions in Syncfusion® SmartFormRecognizer to detect and process form elements easily. platform: document-processing control: SmartFormRecognizer documentation: UG diff --git a/Document-Processing/Data-Extraction/NET/working-with-table-extraction.md b/Document-Processing/Data-Extraction/NET/working-with-table-extraction.md index c81f8fb6c4..12f4b2fca7 100644 --- a/Document-Processing/Data-Extraction/NET/working-with-table-extraction.md +++ b/Document-Processing/Data-Extraction/NET/working-with-table-extraction.md @@ -16,7 +16,7 @@ To quickly get started with extracting table data from PDF and image files in AS ## Extract Table Data as JSON from PDF or Image -To extract structured table data from a PDF document using the [ExtractTableAsJson](https://help.syncfusion.com/cr/document-processing/Syncfusion.SmartTableExtractor.TableExtractor.html#Syncfusion_SmartTableExtractor_TableExtractor_ExtractTableAsJson_System_IO_Stream_) method of the [TableExtractor](https://help.syncfusion.com/cr/document-processing/Syncfusion.SmartTableExtractor.TableExtractor.html) class, refer to the following code +To extract structured table data from a PDF document using the [ExtractTableAsJson](https://help.syncfusion.com/cr/document-processing/Syncfusion.SmartTableExtractor.TableExtractor.html#Syncfusion_SmartTableExtractor_TableExtractor_ExtractTableAsJson_System_IO_Stream_) method of the [TableExtractor](https://help.syncfusion.com/cr/document-processing/Syncfusion.SmartTableExtractor.TableExtractor.html) class, refer to the following code: {% tabs %} @@ -28,11 +28,11 @@ using Syncfusion.SmartTableExtractor; //Open the input PDF file as a stream. using (FileStream stream = new FileStream("Input.pdf", FileMode.Open, FileAccess.Read)) { - // Initialize the Table Extractor + // Initialize the Table Extractor. TableExtractor extractor = new TableExtractor(); - //Extract table data from the PDF document as JSON string. + // Extract table data from the PDF document as a JSON string. string data = extractor.ExtractTableAsJson(stream); - //Save the extracted JSON data into an output file. + // Save the extracted JSON data into an output file. File.WriteAllText("Output.json", data, Encoding.UTF8); } @@ -46,7 +46,7 @@ using Syncfusion.SmartTableExtractor; //Open the input PDF file as a stream. using (FileStream stream = new FileStream("Input.pdf", FileMode.Open, FileAccess.Read)) { - //Initialize the Smart Table Extractor. + // Initialize the Table Extractor. TableExtractor extractor = new TableExtractor(); //Extract table data from the PDF document as JSON string. string data = extractor.ExtractTableAsJson(stream); @@ -64,7 +64,7 @@ You can download a complete working sample from [GitHub](https://github.com/Sync ## Extract Table Data as Markdown from PDF or Image -To extract structured table data from a PDF document using the [ExtractTableAsMarkdown](https://help.syncfusion.com/cr/document-processing/Syncfusion.SmartTableExtractor.TableExtractor.html#Syncfusion_SmartTableExtractor_TableExtractor_ExtractTableAsMarkdown_System_IO_Stream_) method of the [TableExtractor](https://help.syncfusion.com/cr/document-processing/Syncfusion.SmartTableExtractor.TableExtractor.html) class, refer to the following code +To extract structured table data from a PDF document using the [ExtractTableAsMarkdown](https://help.syncfusion.com/cr/document-processing/Syncfusion.SmartTableExtractor.TableExtractor.html#Syncfusion_SmartTableExtractor_TableExtractor_ExtractTableAsMarkdown_System_IO_Stream_) method of the [TableExtractor](https://help.syncfusion.com/cr/document-processing/Syncfusion.SmartTableExtractor.TableExtractor.html) class, refer to the following code example. {% tabs %} @@ -73,14 +73,14 @@ To extract structured table data from a PDF document using the [ExtractTableAsMa using System.Text; using Syncfusion.SmartTableExtractor; -//Open the input PDF file as a stream. +// Open the input PDF file as a stream. using (FileStream stream = new FileStream("Input.pdf", FileMode.Open, FileAccess.Read)) { // Initialize the Table Extractor TableExtractor extractor = new TableExtractor(); - //Extract table data from the PDF document as markdown. + // Extract table data from the PDF document as Markdown. string data = extractor.ExtractTableAsMarkdown(stream); - //Save the extracted markdown data into an output file. + // Save the extracted Markdown data into an output file. File.WriteAllText("Output.md", data, Encoding.UTF8); } @@ -91,14 +91,14 @@ using (FileStream stream = new FileStream("Input.pdf", FileMode.Open, FileAccess using System.Text; using Syncfusion.SmartTableExtractor; -//Open the input PDF file as a stream. +// Open the input PDF file as a stream. using (FileStream stream = new FileStream("Input.pdf", FileMode.Open, FileAccess.Read)) { // Initialize the Table Extractor TableExtractor extractor = new TableExtractor(); - //Extract table data from the PDF document as markdown. + // Extract table data from the PDF document as Markdown. string data = extractor.ExtractTableAsMarkdown(stream); - //Save the extracted markdown data into an output file. + // Save the extracted Markdown data into an output file. File.WriteAllText("Output.md", data, Encoding.UTF8); } @@ -170,7 +170,7 @@ You can download a complete working sample from [GitHub](https://github.com/Sync ### Extract as Markdown -To extract structured table data from a specific range of pages in a PDF document or Image using the [ExtractTableAsMarkdown](https://help.syncfusion.com/cr/document-processing/Syncfusion.SmartTableExtractor.TableExtractor.html#Syncfusion_SmartTableExtractor_TableExtractor_ExtractTableAsMarkdown_System_IO_Stream_) method of the [TableExtractor](https://help.syncfusion.com/cr/document-processing/Syncfusion.SmartTableExtractor.TableExtractor.html) class, refer to the following code example: +To extract structured table data from a specific range of pages in a PDF document or image using the [ExtractTableAsMarkdown](https://help.syncfusion.com/cr/document-processing/Syncfusion.SmartTableExtractor.TableExtractor.html#Syncfusion_SmartTableExtractor_TableExtractor_ExtractTableAsMarkdown_System_IO_Stream_) method of the [TableExtractor](https://help.syncfusion.com/cr/document-processing/Syncfusion.SmartTableExtractor.TableExtractor.html) class, refer to the following code example: {% tabs %} @@ -182,7 +182,7 @@ using Syncfusion.SmartTableExtractor; //Open the input PDF file as a stream. using (FileStream stream = new FileStream("Input.pdf", FileMode.Open, FileAccess.Read)) { - //Initialize the Smart Table Extractor. + //Initialize the Table Extractor. TableExtractor extractor = new TableExtractor(); //Set the page range for extraction (pages 1 to 3). TableExtractionOptions options = new TableExtractionOptions(); @@ -228,19 +228,23 @@ To extract table data asynchronously with cancellation support using the [Extrac {% highlight c# tabtitle="C# [Cross-platform]" %} +using System; +using System.IO; using System.Text; +using System.Threading; +using System.Threading.Tasks; using Syncfusion.SmartTableExtractor; -//Open the input PDF file as a stream. +// Open the input PDF file as a stream. using (FileStream stream = new FileStream("Input.pdf", FileMode.Open, FileAccess.Read)) { - //Initialize the Smart Table Extractor and assign the configured options. + // Initialize the Table Extractor. TableExtractor tableExtractor = new TableExtractor(); - //Create a cancellation token with a timeout of 30 seconds to control the async operation. + // Create a cancellation token with a timeout of 30 seconds to control the async operation. CancellationTokenSource cts = new CancellationTokenSource(TimeSpan.FromSeconds(30)); - //Call the asynchronous extraction API to extract table data as a JSON string. + // Call the asynchronous extraction API to extract table data as a JSON string. string data = await tableExtractor.ExtractTableAsJsonAsync(stream, cts.Token); - //Save the extracted JSON data into an output file. + // Save the extracted JSON data into an output file. File.WriteAllText("Output.json", data, Encoding.UTF8); } @@ -248,19 +252,23 @@ using (FileStream stream = new FileStream("Input.pdf", FileMode.Open, FileAccess {% highlight c# tabtitle="C# [Windows-specific]" %} +using System; +using System.IO; using System.Text; +using System.Threading; +using System.Threading.Tasks; using Syncfusion.SmartTableExtractor; -//Open the input PDF file as a stream. +// Open the input PDF file as a stream. using (FileStream stream = new FileStream("Input.pdf", FileMode.Open, FileAccess.Read)) { - //Initialize the Smart Table Extractor and assign the configured options. + // Initialize the Table Extractor. TableExtractor tableExtractor = new TableExtractor(); - //Create a cancellation token with a timeout of 30 seconds to control the async operation. + // Create a cancellation token with a timeout of 30 seconds to control the async operation. CancellationTokenSource cts = new CancellationTokenSource(TimeSpan.FromSeconds(30)); - //Call the asynchronous extraction API to extract table data as a JSON string. + // Call the asynchronous extraction API to extract table data as a JSON string. string data = await tableExtractor.ExtractTableAsJsonAsync(stream, cts.Token); - //Save the extracted JSON data into an output file. + // Save the extracted JSON data into an output file. File.WriteAllText("Output.json", data, Encoding.UTF8); } @@ -275,7 +283,7 @@ You can download a complete working sample from [GitHub](https://github.com/Sync ### Disable Border-less Table Detection -To disable detection of tables without visible borders in a PDF document or Image using the [ExtractTableAsJson](https://help.syncfusion.com/cr/document-processing/Syncfusion.SmartTableExtractor.TableExtractor.html#Syncfusion_SmartTableExtractor_TableExtractor_ExtractTableAsJson_System_IO_Stream_) method of the [TableExtractor](https://help.syncfusion.com/cr/document-processing/Syncfusion.SmartTableExtractor.TableExtractor.html) class, refer to the following code examples. +To disable detection of tables without visible borders in a PDF document or image using the [ExtractTableAsJson](https://help.syncfusion.com/cr/document-processing/Syncfusion.SmartTableExtractor.TableExtractor.html#Syncfusion_SmartTableExtractor_TableExtractor_ExtractTableAsJson_System_IO_Stream_) method of the [TableExtractor](https://help.syncfusion.com/cr/document-processing/Syncfusion.SmartTableExtractor.TableExtractor.html) class, refer to the following code examples. {% tabs %} @@ -311,16 +319,16 @@ using Syncfusion.SmartTableExtractor; //Open the input PDF file as a stream. using (FileStream stream = new FileStream("Input.pdf", FileMode.Open, FileAccess.Read)) { - //Initialize the Smart Table Extractor. + // Initialize the Table Extractor. TableExtractor extractor = new TableExtractor(); - //Configure the table extraction option to detect border-less tables in the document. + // Configure the table extraction option to detect border-less tables in the document. TableExtractionOptions options = new TableExtractionOptions(); options.DetectBorderlessTables = true; - //Assign the configured options to the extractor. + // Assign the configured options to the extractor. extractor.TableExtractionOptions = options; - //Extract table data from the PDF document as a JSON string. + // Extract table data from the PDF document as a JSON string. string data = extractor.ExtractTableAsJson(stream); - //Save the extracted JSON data into an output file. + // Save the extracted JSON data into an output file. File.WriteAllText("Output.json", data, Encoding.UTF8); } @@ -348,7 +356,7 @@ using (FileStream stream = new FileStream("Input.pdf", FileMode.Open, FileAccess TableExtractor extractor = new TableExtractor(); //Configure table extraction options to set the confidence threshold for detection. TableExtractionOptions options = new TableExtractionOptions(); - options.ConfidenceThreshold = 0.6; + options.ConfidenceThreshold = 0.6f; //Assign the configured options to the extractor. extractor.TableExtractionOptions = options; //Extract table data from the PDF document as a JSON string. @@ -371,7 +379,7 @@ using (FileStream stream = new FileStream("Input.pdf", FileMode.Open, FileAccess TableExtractor extractor = new TableExtractor(); //Configure table extraction options to set the confidence threshold for detection. TableExtractionOptions options = new TableExtractionOptions(); - options.ConfidenceThreshold = 0.6; + options.ConfidenceThreshold = 0.6f; //Assign the configured options to the extractor. extractor.TableExtractionOptions = options; //Extract table data from the PDF document as a JSON string. @@ -388,7 +396,7 @@ You can download a complete working sample from [GitHub](https://github.com/Sync ## PDF to Markdown Preservation Mapping -This section illustrates how table elements in PDF documents are converted and preserved in Markdown format, ensuring that document structure and formatting remain consistent during the PDF‑to‑Markdown conversion process. +This section illustrates how table elements in PDF documents are converted and preserved in Markdown format, ensuring that document structure and formatting remain consistent during the PDF to Markdown conversion process.
diff --git a/Document-Processing/Data-Extraction/overview.md b/Document-Processing/Data-Extraction/overview.md index 1f39afbb64..fe5401585d 100644 --- a/Document-Processing/Data-Extraction/overview.md +++ b/Document-Processing/Data-Extraction/overview.md @@ -1,10 +1,10 @@ --- -title: Extract structured data from PDF & image Files in .NET | Syncfusion -description: Syncfusion® Smart Data Extractor is a .NET library that extracts tables, forms, text, and images from documents, outputing PDFs and JSON. +title: Extract Structured Data from PDF and Image Files in .NET | Syncfusion +description: Syncfusion® Smart Data Extractor is a .NET library that extracts tables, forms, text, and images from PDF documents. platform: document-processing control: SmartDataExtractor documentation: UG -keywords: Assemblies +keywords: Syncfusion.SmartDataExtractor, Syncfusion.SmartTableExtractor, Syncfusion.SmartFormRecognizer, Syncfusion.PDF.OCR --- # Welcome to Syncfusion Data Extraction Library