From c404ce412c1aacefbec1abf83be7032877d7736c Mon Sep 17 00:00:00 2001 From: venkateshwaransf5013 Date: Fri, 4 Sep 2026 12:03:36 +0530 Subject: [PATCH 1/3] 1051486 : Added the pdf to word and barcode recognition content in Data Extraction --- Document-Processing-toc.html | 3 + .../NET/Assemblies-required.md | 3 + .../NET/conversions/pdf-to-word.md | 113 ++++++++++++++++++ .../NET/working-with-data-extraction.md | 48 ++++++++ 4 files changed, 167 insertions(+) create mode 100644 Document-Processing/Data-Extraction/NET/conversions/pdf-to-word.md diff --git a/Document-Processing-toc.html b/Document-Processing-toc.html index c7d1875ea4..bd69959ddd 100644 --- a/Document-Processing-toc.html +++ b/Document-Processing-toc.html @@ -289,6 +289,9 @@
  • PDF or Image to Markdown
  • +
  • + PDF or Image to Word +
  • diff --git a/Document-Processing/Data-Extraction/NET/Assemblies-required.md b/Document-Processing/Data-Extraction/NET/Assemblies-required.md index 7f2b714bd9..71416b4e2c 100644 --- a/Document-Processing/Data-Extraction/NET/Assemblies-required.md +++ b/Document-Processing/Data-Extraction/NET/Assemblies-required.md @@ -27,6 +27,7 @@ The following assemblies need to be referenced in your application to extract da Syncfusion.SmartDataExtractor.Base
    + Syncfusion.DocIO.Base
    Syncfusion.Compression.Base
    Syncfusion.ImagePreProcessor.Base
    Syncfusion.OCRProcessor.Base
    @@ -44,6 +45,7 @@ The following assemblies need to be referenced in your application to extract da Syncfusion.SmartDataExtractor.Portable
    + Syncfusion.DocIO.Portable
    Syncfusion.Compression.Portable
    Syncfusion.ImagePreProcessor.Portable
    Syncfusion.OCRProcessor.Portable
    @@ -61,6 +63,7 @@ The following assemblies need to be referenced in your application to extract da Syncfusion.SmartDataExtractor.NET
    + Syncfusion.DocIO.NET
    Syncfusion.Compression.NET
    Syncfusion.ImagePreProcessor.NET
    Syncfusion.OCRProcessor.NET
    diff --git a/Document-Processing/Data-Extraction/NET/conversions/pdf-to-word.md b/Document-Processing/Data-Extraction/NET/conversions/pdf-to-word.md new file mode 100644 index 0000000000..6aedd5423a --- /dev/null +++ b/Document-Processing/Data-Extraction/NET/conversions/pdf-to-word.md @@ -0,0 +1,113 @@ +--- +title: Convert PDF to Word in .NET Smart Data Extractor | Syncfusion +description: Extract PDF documents as Word using Smart Data Extractor. Convert PDF content into editable, structured Word documents in .NET. +platform: document-processing +control: SmartDataExtractor +documentation: UG +keywords: Assemblies +--- + +# Convert PDF to Word in .NET Smart Data Extractor + +Word (DOCX) is a widely used format for creating and editing professional documents. The Syncfusion® Smart Data Extractor library supports PDF to Word conversion in .NET, enabling seamless transformation of PDF files into fully editable Word documents while preserving the original layout, tables, images, and text formatting. This feature makes it easier to reuse content, improve accessibility, and integrate document data into downstream applications and business workflows. + +## Assemblies and NuGet packages required + +Refer to the following links for the assemblies and NuGet packages required based on your target platform to extract data as a Word file using the Syncfusion® Smart Data Extractor library. + +* [PDF to Word Extraction assemblies](/document-processing/data-extraction/net/Assemblies-required) +* [PDF to Word Extraction NuGet packages](/document-processing/data-extraction/net/Nuget-packages-required) + +## Extract Data as Word from PDF or Image + +To extract structured data from a PDF document or image using the **ExtractDataAsWordDocument** method of the [DataExtractor](https://help.syncfusion.com/cr/document-processing/Syncfusion.SmartDataExtractor.DataExtractor.html) class, refer to the following code example: + +{% tabs %} + +{% highlight c# tabtitle="C# [Cross-platform]" %} + +using Syncfusion.SmartDataExtractor; +using Syncfusion.DocIO.DLS; + +//Open the input PDF file as a stream. +using (FileStream stream = new FileStream("Input.pdf", FileMode.Open, FileAccess.Read)) +{ + //Initialize the Data Extractor. + DataExtractor extractor = new DataExtractor(); + //Extract data as WordDocument. + WordDocument word = extractor.ExtractDataAsWordDocument(stream); + //Save the extracted Word data into an output file. + word.Save("Output.docx"); + word.Close(); +} + +{% endhighlight %} + +{% highlight c# tabtitle="C# [Windows-specific]" %} + +using Syncfusion.SmartDataExtractor; +using Syncfusion.DocIO.DLS; + +//Open the input PDF file as a stream. +using (FileStream stream = new FileStream("Input.pdf", FileMode.Open, FileAccess.Read)) +{ + //Initialize the Data Extractor. + DataExtractor extractor = new DataExtractor(); + //Extract data as WordDocument. + WordDocument word = extractor.ExtractDataAsWordDocument(stream); + //Save the extracted Word data into an output file. + word.Save("Output.docx"); + word.Close(); +} + +{% endhighlight %} + +{% endtabs %} + +N> If you want to extract data from an image instead of a PDF, replace the input stream with the image file (for example, Input.jpg or Input.png). The rest of the code remains unchanged. + +You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/PDF-Examples/tree/master/Data-Extraction/Smart-Data-Extractor/Extract-data-as-MD-from-PDF/.NET). + +## Extract data as HTML from PDF or Image + +To extract structured data from a PDF document or image using the **ExtractDataAsHtmlDocument** method of the [DataExtractor](https://help.syncfusion.com/cr/document-processing/Syncfusion.SmartDataExtractor.DataExtractor.html) class, refer to the following code example: + +{% tabs %} + +{% highlight c# tabtitle="C# [Cross-platform]" %} + +using Syncfusion.SmartDataExtractor; + +//Open the input PDF file as a stream. +using (FileStream stream = new FileStream("Input.pdf", FileMode.Open, FileAccess.Read)) +{ + //Initialize the Data Extractor. + DataExtractor extractor = new DataExtractor(); + //Extract data as HTML. + string htmlContent = extractor.ExtractDataAsHtml(stream); + //Save the extracted HTML data into an output file. + File.WriteAllText("Output.html", htmlContent); +} + +{% endhighlight %} + +{% highlight c# tabtitle="C# [Windows-specific]" %} + +using Syncfusion.SmartDataExtractor; + +//Open the input PDF file as a stream. +using (FileStream stream = new FileStream("Input.pdf", FileMode.Open, FileAccess.Read)) +{ + //Initialize the Data Extractor. + DataExtractor extractor = new DataExtractor(); + //Extract data as HTML. + string htmlContent = extractor.ExtractDataAsHtml(stream); + //Save the extracted HTML data into an output file. + File.WriteAllText("Output.html", htmlContent); +} + +{% endhighlight %} + +{% endtabs %} + +N> If you want to extract data from an image instead of a PDF, replace the input stream with the image file (for example, Input.jpg or Input.png). The rest of the code remains unchanged. 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 cd243fe57f..b6223ac15f 100644 --- a/Document-Processing/Data-Extraction/NET/working-with-data-extraction.md +++ b/Document-Processing/Data-Extraction/NET/working-with-data-extraction.md @@ -794,3 +794,51 @@ using (FileStream stream = new FileStream("Input.pdf", FileMode.Open, FileAccess {% endtabs %} +## Barcode recognition + +The Syncfusion® Smart Data Extractor library enables barcode extraction from PDF documents and scanned images. The extracted barcode information is returned in JSON format, including properties such as Type, BarcodeType, Content, Threshold, and Bounds. + +Additionally, when the output is extracted in Markdown format, barcodes are returned as Base64‑encoded image values, enabling easy rendering and storage of barcode images. + +To recognize barcodes, use the following code snippet: + +{% tabs %} + +{% highlight c# tabtitle="C# [Cross-platform]" %} + +using System.Text; +using Syncfusion.SmartDataExtractor; + +//Open the input PDF file as a stream. +using (FileStream stream = new FileStream("Input.pdf", FileMode.Open, FileAccess.Read)) +{ + //Initialize the Data Extractor. + DataExtractor extractor = new DataExtractor(); + //Extract data as JSON. + string data = extractor.ExtractDataAsJson(stream); + //Save the extracted JSON data into an output file. + File.WriteAllText("Output.json", data, Encoding.UTF8); +} + +{% endhighlight %} + +{% highlight c# tabtitle="C# [Windows-specific]" %} + +using System.Text; +using Syncfusion.SmartDataExtractor; + +//Open the input PDF file as a stream. +using (FileStream stream = new FileStream("Input.pdf", FileMode.Open, FileAccess.Read)) +{ + //Initialize the Data Extractor. + DataExtractor extractor = new DataExtractor(); + //Extract data as JSON. + string data = extractor.ExtractDataAsJson(stream); + //Save the extracted JSON data into an output file. + File.WriteAllText("Output.json", data, Encoding.UTF8); +} + +{% endhighlight %} + +{% endtabs %} + From f22496b13b34d47c430481e66b81791ac75988db Mon Sep 17 00:00:00 2001 From: venkateshwaransf5013 Date: Fri, 4 Sep 2026 14:07:49 +0530 Subject: [PATCH 2/3] Added changes --- .../NET/conversions/pdf-to-word.md | 23 +++++++++---------- 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/Document-Processing/Data-Extraction/NET/conversions/pdf-to-word.md b/Document-Processing/Data-Extraction/NET/conversions/pdf-to-word.md index 6aedd5423a..e7f2108e71 100644 --- a/Document-Processing/Data-Extraction/NET/conversions/pdf-to-word.md +++ b/Document-Processing/Data-Extraction/NET/conversions/pdf-to-word.md @@ -1,6 +1,6 @@ --- title: Convert PDF to Word in .NET Smart Data Extractor | Syncfusion -description: Extract PDF documents as Word using Smart Data Extractor. Convert PDF content into editable, structured Word documents in .NET. +description: Convert PDF documents to Word using Smart Data Extractor. Transform PDF content into editable, structured Word documents in .NET. platform: document-processing control: SmartDataExtractor documentation: UG @@ -9,18 +9,18 @@ keywords: Assemblies # Convert PDF to Word in .NET Smart Data Extractor -Word (DOCX) is a widely used format for creating and editing professional documents. The Syncfusion® Smart Data Extractor library supports PDF to Word conversion in .NET, enabling seamless transformation of PDF files into fully editable Word documents while preserving the original layout, tables, images, and text formatting. This feature makes it easier to reuse content, improve accessibility, and integrate document data into downstream applications and business workflows. +Word (DOCX) is a widely used format for creating and editing professional documents. The Syncfusion® Smart Data Extractor library supports PDF to Word conversion in .NET, enabling seamless transformation of PDF files into fully editable Word documents while preserving the original layout, tables and images. This feature makes it easier to reuse content, improve accessibility, and integrate document data into downstream applications and business workflows. ## Assemblies and NuGet packages required Refer to the following links for the assemblies and NuGet packages required based on your target platform to extract data as a Word file using the Syncfusion® Smart Data Extractor library. -* [PDF to Word Extraction assemblies](/document-processing/data-extraction/net/Assemblies-required) -* [PDF to Word Extraction NuGet packages](/document-processing/data-extraction/net/Nuget-packages-required) +* [PDF to Word Conversion assemblies](/document-processing/data-extraction/net/Assemblies-required) +* [PDF to Word Conversion NuGet packages](/document-processing/data-extraction/net/Nuget-packages-required) -## Extract Data as Word from PDF or Image +## Convert PDF or Image to Word Document -To extract structured data from a PDF document or image using the **ExtractDataAsWordDocument** method of the [DataExtractor](https://help.syncfusion.com/cr/document-processing/Syncfusion.SmartDataExtractor.DataExtractor.html) class, refer to the following code example: +To convert a PDF document or image into a Word using the **ExtractDataAsWordDocument** method of the [DataExtractor](https://help.syncfusion.com/cr/document-processing/Syncfusion.SmartDataExtractor.DataExtractor.html) class, refer to the following code example: {% tabs %} @@ -64,13 +64,11 @@ using (FileStream stream = new FileStream("Input.pdf", FileMode.Open, FileAccess {% endtabs %} -N> If you want to extract data from an image instead of a PDF, replace the input stream with the image file (for example, Input.jpg or Input.png). The rest of the code remains unchanged. +N> If you want to convert an image instead of a PDF, replace the input stream with the image file (for example, Input.jpg or Input.png). The rest of the code remains unchanged. -You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/PDF-Examples/tree/master/Data-Extraction/Smart-Data-Extractor/Extract-data-as-MD-from-PDF/.NET). +## Convert PDF or Image to HTML Document -## Extract data as HTML from PDF or Image - -To extract structured data from a PDF document or image using the **ExtractDataAsHtmlDocument** method of the [DataExtractor](https://help.syncfusion.com/cr/document-processing/Syncfusion.SmartDataExtractor.DataExtractor.html) class, refer to the following code example: +TTo convert a PDF document or image into HTML output using the **ExtractDataAsHtmlDocument** method of the [DataExtractor](https://help.syncfusion.com/cr/document-processing/Syncfusion.SmartDataExtractor.DataExtractor.html) class, refer to the following code example: {% tabs %} @@ -110,4 +108,5 @@ using (FileStream stream = new FileStream("Input.pdf", FileMode.Open, FileAccess {% endtabs %} -N> If you want to extract data from an image instead of a PDF, replace the input stream with the image file (for example, Input.jpg or Input.png). The rest of the code remains unchanged. +N> If you want to convert an image instead of a PDF, replace the input stream with the image file (for example, Input.jpg or Input.png). The rest of the code remains unchanged. + From d5947fd2b91f4628d927f4cdbf4d19b3ef1e0365 Mon Sep 17 00:00:00 2001 From: venkateshwaransf5013 Date: Mon, 7 Sep 2026 16:52:20 +0530 Subject: [PATCH 3/3] added the changes --- .../Data-Extraction/NET/overview.md | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/Document-Processing/Data-Extraction/NET/overview.md b/Document-Processing/Data-Extraction/NET/overview.md index 33202286ff..fb36daaaba 100644 --- a/Document-Processing/Data-Extraction/NET/overview.md +++ b/Document-Processing/Data-Extraction/NET/overview.md @@ -255,6 +255,47 @@ FormObjects represent interactive form fields detected on the page, such as text N> The **FormObjects** structure is not available in the Smart Table Extractor output. +### BarcodeObjects + +BarcodeObjects represent barcodes detected on a page by the Smart Data Extractor. They contain information about the barcode value, barcode type, location on the page, and the confidence score of the detection. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    AttributeTypeDescription
    TypeStringDefines the kind of object detected on the page (Barcode).
    BoundsArray of FloatsThe bounding box coordinates [X, Y, Width, Height] representing the barcode's position and size on the page.
    ContentStringThe decoded value extracted from the barcode.
    BarcodeTypeStringSpecifies the barcode symbology detected, such as RSS_14, QR_CODE, CODE_128, EAN_13, etc.
    ConfidenceFloatConfidence score (0–1) indicating the accuracy of the barcode detection.
    + ### Text Attribute Represents the text formatting attributes (font family, font style, font size) applied to the extracted text.