ByteScout Premium Suite - C# - Convert PDF To XML With Images with PDF Extractor SDK - ByteScout
Announcement
Our ByteScout SDK products are sunsetting as we focus on expanding new solutions.
Learn More Open modal
Close modal
Announcement Important Update
ByteScout SDK Sunsetting Notice
Our ByteScout SDK products are sunsetting as we focus on our new & improved solutions. Thank you for being part of our journey, and we look forward to supporting you in this next chapter!

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

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

How to convert PDF to XML with images with PDF extractor SDK in C# with ByteScout Premium Suite

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

These sample source codes on this page below are displaying how to convert PDF to XML with images with PDF extractor SDK in C#. ByteScout Premium Suite: the bundle that includes twelve SDK products from ByteScout including tools and components for PDF, barcodes, spreadsheets, screen video recording. It can convert PDF to XML with images with PDF extractor SDK in C#.

The following code snippet for ByteScout Premium Suite works best when you need to quickly convert PDF to XML with images with PDF extractor SDK 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! If you want to use these C# sample examples in one or many applications then they can be used easily.

You can download free trial version of ByteScout Premium Suite from our website to see and try many others 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 PDF2XML { class Program { static void Main(string[] args) { // Create Bytescout.PDFExtractor.XMLExtractor instance XMLExtractor extractor = new XMLExtractor(); extractor.RegistrationName = "demo"; extractor.RegistrationKey = "demo"; // Load sample PDF document extractor.LoadDocumentFromFile("sample1.pdf"); // Uncomment this line to get rid of empty nodes in XML //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.SaveXMLToFile("result_with_external_images.xml"); // Embed images into XML as Base64 encoded string extractor.SaveImages = ImageHandling.Embed; extractor.SaveXMLToFile("result_with_embedded_images.xml"); // Cleanup extractor.Dispose(); } } }

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout Premium Suite Home Page

Explore ByteScout Premium Suite Documentation

Explore Samples

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

Explore ByteScout Premium Suite Documentation

Explore Samples

Sign Up for ByteScout Premium Suite Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next