ByteScout PDF Extractor SDK - C# - Reading and Writing to Azure Blob - ByteScout

ByteScout PDF Extractor SDK – C# – Reading and Writing to Azure Blob

  • Home
  • /
  • Articles
  • /
  • ByteScout PDF Extractor SDK – C# – Reading and Writing to Azure Blob

reading and writing to azure blob in C# and ByteScout PDF Extractor SDK

Build reading and writing to azure blob in C#

:

Step-by-step instructions on how to do reading and writing to azure blob in C#

These source code samples are assembled by their programming language and functions they use. ByteScout PDF Extractor SDK helps with reading and writing to azure blob in C#. ByteScout PDF Extractor SDK is the SDK that helps developers to extract data from unstructured documents, pdf, images, scanned and electronic forms. Includes AI functions like automatic table detection, automatic table extraction and restructuring, text recognition and text restoration from pdf and scanned documents. Includes PDF to CSV, PDF to XML, PDF to JSON, PDF to searchable PDF functions as well as methods for low level data extraction.

Want to speed up the application development? Then this C#, code samples for C#, developers help to speed up the application development and writing a code when using ByteScout PDF Extractor SDK. If you want to know how it works, then this C# sample code should be copied and pasted into your application’s code editor. Then just compile and run it. C# application implementation mostly involves various stages of the software development so even if the functionality works please check it with your data and the production environment.

On our website you may get trial version of ByteScout PDF Extractor SDK for free. Source code samples are included to help you with your C# application.

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 System.Collections.Generic; using System.Text; using System.Diagnostics; using Bytescout.PDFExtractor; using System.IO; namespace ConsoleApplication { class Program { static void Main(string[] args) { /* Please note: Streams can be read/write to azure blobs, so in this example, we're demonstrating how to read pdf from stream, convert to csv, and write to csv stream */ // Create Bytescout.PDFExtractor.CSVExtractor instance CSVExtractor extractor = new CSVExtractor(); extractor.RegistrationName = "demo"; extractor.RegistrationKey = "demo"; // Get input stream var inputStream = GetMemoryStream("sample3.pdf"); // Load sample PDF document from stream extractor.LoadDocumentFromStream(inputStream); // you can change CSV separator symbol (if needed) from "," symbol to another if needed for non-US locales //extractor.CSVSeparatorSymbol = ","; // Save extracted CSV data to output stream var outputStream = new MemoryStream(); extractor.SaveCSVToStream(outputStream); // Save output stream to file, so we can take a look WriteStreamToFile(outputStream, "output.csv"); // Cleanup extractor.Dispose(); Console.WriteLine(); Console.WriteLine("Data has been extracted to 'output.csv' file."); Console.WriteLine(); Console.WriteLine("Press any key to continue and open CSV in default CSV viewer (or Excel)..."); Console.ReadKey(); // Open result document in default associated application (for demo purpose) ProcessStartInfo processStartInfo = new ProcessStartInfo("output.csv"); processStartInfo.UseShellExecute = true; Process.Start(processStartInfo); } /// <summary> /// Get memory stream from file /// </summary> public static Stream GetMemoryStream(string fileName) { return new FileStream(fileName, FileMode.Open); } /// <summary> /// Write stream to file /// </summary> public static void WriteStreamToFile(Stream stream, string fileName) { using (var fileStream = File.Create(fileName)) { stream.Seek(0, SeekOrigin.Begin); stream.CopyTo(fileStream); } } } }

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout PDF Extractor SDK Home Page

Explore ByteScout PDF Extractor SDK Documentation

Explore Samples

Sign Up for ByteScout PDF Extractor 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 PDF Extractor SDK Home Page

Explore ByteScout PDF Extractor SDK Documentation

Explore Samples

Sign Up for ByteScout PDF Extractor SDK Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next