Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ The following assemblies need to be referenced in your application based on the
Syncfusion.PdfToImageConverter.Base<br/>
Syncfusion.SmartFormRecognizer.Base<br/>
Syncfusion.SmartTableExtractor.Base<br/>
Syncfusion.Markdown<br/>
</td>
</tr>
<tr>
Expand All @@ -47,6 +48,7 @@ The following assemblies need to be referenced in your application based on the
Syncfusion.PdfToImageConverter.Portable<br/>
Syncfusion.SmartFormRecognizer.Portable<br/>
Syncfusion.SmartTableExtractor.Portable<br/>
Syncfusion.Markdown<br/>
</td>
</tr>
<tr>
Expand All @@ -62,6 +64,7 @@ The following assemblies need to be referenced in your application based on the
Syncfusion.PdfToImageConverter.NET<br/>
Syncfusion.SmartFormRecognizer.NET<br/>
Syncfusion.SmartTableExtractor.NET<br/>
Syncfusion.Markdown<br/>
</td>
</tr>
</tbody>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ using (FileStream inputStream = new FileStream("Input.pdf", FileMode.Open, FileA

## Extract Data as JSON from PDF Document

To extract form fields across a PDF document using the **ExtractDataAsJson** method of the **DataExtractor** class with form recognition options, refer to the following code example:
To extract form fields across a PDF document using the **ExtractDataAsJson** method of the **DataExtractor** class, refer to the following code example:

{% tabs %}

Expand All @@ -129,7 +129,7 @@ using (FileStream stream = new FileStream("Input.pdf", FileMode.Open, FileAccess
{
//Initialize the Smart Data Extractor.
DataExtractor extractor = new DataExtractor();
//Extract form data as JSON.
//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);
Expand All @@ -149,7 +149,7 @@ using (FileStream stream = new FileStream("Input.pdf", FileMode.Open, FileAccess
{
//Initialize the Smart Data Extractor.
DataExtractor extractor = new DataExtractor();
//Extract form data as JSON.
//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);
Expand All @@ -159,6 +159,54 @@ using (FileStream stream = new FileStream("Input.pdf", FileMode.Open, FileAccess

{% endtabs %}

## Extract Data as Markdown from PDF Document

To extract form fields across a PDF document using the **ExtractDataAsMarkdown** method of the **DataExtractor** class, refer to the following code example:

{% tabs %}

{% highlight c# tabtitle="C# [Cross-platform]" %}

using System.IO;
using Syncfusion.SmartDataExtractor;
using Syncfusion.SmartFormRecognizer;
using System.Text;

//Open the input PDF file as a stream.
using (FileStream stream = new FileStream("Input.pdf", FileMode.Open, FileAccess.Read))
{
//Initialize the Smart Data Extractor.
DataExtractor extractor = new DataExtractor();
//Extract data as Markdown.
string data = extractor.ExtractDataAsMarkdown(stream);
//Save the extracted Markdown data into an output file.
File.WriteAllText("Output.md", data, Encoding.UTF8);
}

{% endhighlight %}

{% highlight c# tabtitle="C# [Windows-specific]" %}

using System.IO;
using Syncfusion.SmartDataExtractor;
using Syncfusion.SmartFormRecognizer;
using System.Text;

//Open the input PDF file as a stream.
using (FileStream stream = new FileStream("Input.pdf", FileMode.Open, FileAccess.Read))
{
//Initialize the Smart Data Extractor.
DataExtractor extractor = new DataExtractor();
//Extract data as Markdown.
string data = extractor.ExtractDataAsMarkdown(stream);
//Save the extracted Markdown data into an output file.
File.WriteAllText("Output.md", data, Encoding.UTF8);
}

{% endhighlight %}

{% endtabs %}

## Extract Data as JSON from an Image

To extract structured data from an image document using the **ExtractDataAsJson** method of the **DataExtractor** class, refer to the following code examples.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,18 +78,21 @@ documentation: UG
<th style="font-size:14px" width="100px">Solution</th>
<td>
In your MVC project file (.csproj), add the following build target to copy the native DLL from the NuGet package folder to the bin folder:
<br/><br/>
<pre>
<Target Name="CopyOnnxRuntimeDll" AfterTargets="Build">
<Copy
SourceFiles="$(SolutionDir)packages\Microsoft.ML.ONNXRuntime.1.18.0\runtimes\win-x64\native\ONNXRuntime.dll"
DestinationFolder="$(OutDir)"
SkipUnchangedFiles="true" />
</Target>
</pre>
<br/>
</td>
</tr>
{% tabs %}
{% highlight C# %}

<Target Name="CopyonnxRuntimeDll" AfterTargets="Build">
<Copy
SourceFiles="$(SolutionDir)packages\Microsoft.ML.ONNXRuntime.1.18.0\runtimes\win-x64\native\ONNXRuntime.dll"
DestinationFolder="$(OutDir)"
SkipUnchangedFiles="true" />
</Target>

{% endhighlight %}
{% endtabs %}
</td>
</tr>
</table>


Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ The following assemblies need to be referenced in your application based on the
Syncfusion.OCRProcessor.Base<br/>
Syncfusion.Pdf.Base<br/>
Syncfusion.PdfToImageConverter.Base<br/>
Syncfusion.Markdown<br/>
</td>
</tr>
<tr>
Expand All @@ -43,6 +44,7 @@ The following assemblies need to be referenced in your application based on the
Syncfusion.Pdf.Imaging.Portable<br/>
Syncfusion.Pdf.Portable<br/>
Syncfusion.PdfToImageConverter.Portable<br/>
Syncfusion.Markdown<br/>
</td>
</tr>
<tr>
Expand All @@ -56,6 +58,7 @@ The following assemblies need to be referenced in your application based on the
Syncfusion.Pdf.Imaging.NET<br/>
Syncfusion.Pdf.NET<br/>
Syncfusion.PdfToImageConverter.NET<br/>
Syncfusion.Markdown<br/>
</td>
</tr>
</tbody>
Expand Down
Loading