ByteScout Document Parser SDK - C# - Parse Simple Document - ByteScout

ByteScout Document Parser SDK – C# – Parse Simple Document

  • Home
  • /
  • Articles
  • /
  • ByteScout Document Parser SDK – C# – Parse Simple Document

How to parse simple document in C# and ByteScout Document Parser SDK

This tutorial will show how to parse simple document in C#

The documentation is designed to help you to implement the features on your side. ByteScout Document Parser SDK is the customizable data extraction platform for batch data extraction from documents. Relies on special templates that can be created with no special technical skills required. Supports millions of documents as input and designed to handle multiple threads. Can output data as JSON, CSV, XML or custom format. It can be used to parse simple document using C#.

This code snippet below for ByteScout Document Parser SDK works best when you need to quickly parse simple document in your C# application. This C# sample code is all you need for your app. Just copy and paste the code, add references (if needs to) and you are all set! Code testing will allow the function to be tested and work properly with your data.

Trial version of ByteScout Document Parser SDK is available for free. Source code samples are included to help you with your C# app.

On-demand (REST Web API) version:
 Web API (on-demand version)

On-premise offline SDK for Windows:
 60 Day Free Trial (on-premise)

Program.cs
      
using System; using ByteScout.DocumentParser; // This example demonstrates document data parsing to JSON, YAML and XML formats. namespace GeneralExample { class Program { static void Main(string[] args) { string templatesFolder = @".\Templates"; string inputDocument1 = @".\DigitalOcean.pdf"; string inputDocument2 = @".\AmazonAWS.pdf"; string inputDocument3 = @".\Google.pdf"; // Create DocumentParser instance using (DocumentParser documentParser = new DocumentParser("demo", "demo")) { Console.WriteLine({code}quot;Loading templates..."); int count = documentParser.AddTemplates(templatesFolder); Console.WriteLine({code}quot;{count} templates loaded."); Console.WriteLine(); Console.WriteLine({code}quot;Parsing \"{inputDocument1}\"..."); Console.WriteLine(); // Parse document data in JSON format string jsonString = documentParser.ParseDocument(inputDocument1, OutputFormat.JSON); // Display parsed data in console Console.WriteLine("Parsing results in JSON format:"); Console.WriteLine(); Console.WriteLine(jsonString); Console.WriteLine(); Console.WriteLine({code}quot;Parsing \"{inputDocument2}\"..."); Console.WriteLine(); // Parse document data in YAML format string yamlString = documentParser.ParseDocument(inputDocument2, OutputFormat.YAML); // Display parsed data in console Console.WriteLine("Parsing results in YAML format:"); Console.WriteLine(); Console.WriteLine(yamlString); Console.WriteLine(); Console.WriteLine({code}quot;Parsing \"{inputDocument3}\"..."); Console.WriteLine(); // Parse document data in XML format string xmlString = documentParser.ParseDocument(inputDocument3, OutputFormat.XML); // Display parsed data in console Console.WriteLine("Parsing results in XML format:"); Console.WriteLine(); Console.WriteLine(xmlString); } Console.WriteLine(); Console.WriteLine("Press any key to continue..."); Console.ReadLine(); } } }

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout Document Parser SDK Home Page

Explore ByteScout Document Parser SDK Documentation

Explore Samples

Sign Up for ByteScout Document Parser SDK Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

VIDEO

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout Document Parser SDK Home Page

Explore ByteScout Document Parser SDK Documentation

Explore Samples

Sign Up for ByteScout Document Parser SDK Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next