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)
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(); } } }
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
Get Your API Key
Explore Web API Docs
Explore Web API Samples
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
Get Your API Key
Explore Web API Docs
Explore Web API Samples
also available as: