ByteScout PDF Suite - C# - Convert PDF To JSON With Images with PDF Extractor SDK - ByteScout

ByteScout PDF Suite – C# – Convert PDF To JSON With Images with PDF Extractor SDK

  • Home
  • /
  • Articles
  • /
  • ByteScout PDF Suite – C# – Convert PDF To JSON With Images with PDF Extractor SDK

How to convert PDF to JSON with images with PDF extractor SDK in C# and ByteScout PDF Suite

Learn to convert PDF to JSON with images with PDF extractor SDK in C#

An easy to understand sample source code to learn how to convert PDF to JSON with images with PDF extractor SDK in C# Want to convert PDF to JSON with images with PDF extractor SDK in your C# app? ByteScout PDF Suite is designed for it. ByteScout PDF Suite is the bundle that provides six different SDK libraries to work with PDF from generating rich PDF reports to extracting data from PDF documents and converting them to HTML. This bundle includes PDF (Generator) SDK, PDF Renderer SDK, PDF Extractor SDK, PDF to HTML SDK, PDF Viewer SDK and PDF Generator SDK for Javascript.

These C# code samples for C# guide developers to speed up coding of the application when using ByteScout PDF Suite. Just copy and paste the code into your C# application’s code and follow the instructions. Applying C# application mostly includes various stages of the software development so even if the functionality works please test it with your data and the production environment.

If you want to try other source code samples then the free trial version of ByteScout PDF Suite is available for download from our website. Just try other source code samples for C#.

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.PDFExtractor; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { // Create Bytescout.PDFExtractor.JSONExtractor instance JSONExtractor extractor = new JSONExtractor(); extractor.RegistrationName = "demo"; extractor.RegistrationKey = "demo"; // Load sample PDF document extractor.LoadDocumentFromFile("sample1.pdf"); // Uncomment this line to get rid of empty nodes in JSON //extractor.PreserveFormattingOnTextExtraction = false; // Set output image format extractor.ImageFormat = OutputImageFormat.PNG; // Save images to external files extractor.SaveImages = ImageHandling.OuterFile; extractor.ImageFolder = "images"; // Folder for external images extractor.SaveJSONToFile("result_with_external_images.json"); // Embed images into JSON as Base64 encoded string extractor.SaveImages = ImageHandling.Embed; extractor.SaveJSONToFile("result_with_embedded_images.json"); // Cleanup extractor.Dispose(); } } }

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout PDF Suite Home Page

Explore ByteScout PDF Suite Documentation

Explore Samples

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

Explore ByteScout PDF Suite Documentation

Explore Samples

Sign Up for ByteScout PDF Suite Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next