An easy to understand guide on how to convert PDF XFA form to XML with PDF extractor SDK in C# with this source code sample. Want to convert PDF XFA form to XML with PDF extractor SDK in your C# app? ByteScout Data Extraction Suite is designed for it. ByteScout Data Extraction Suite is the set that includes 3 SDK products for data extraction from PDF, scans, images and from spreadsheets: PDF Extractor SDK, Data Extraction SDK, Barcode Reader SDK.
This prolific sample source code in C# for ByteScout Data Extraction Suite contains various functions and other necessary options you should do calling the API to convert PDF XFA form to XML with PDF extractor SDK. IF you want to implement the functionality, just copy and paste this code for C# below into your code editor with your app, compile and run your application. This basic programming language sample code for C# will do the whole work for you to convert PDF XFA form to XML with PDF extractor SDK.
If you want to try other source code samples then the free trial version of ByteScout Data Extraction 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)
using System; using Bytescout.PDFExtractor; namespace XFAFormToXML { class Program { static void Main(string[] args) { // Create Bytescout.PDFExtractor.XFAFormExtractor instance XFAFormExtractor extractor = new XFAFormExtractor(); extractor.RegistrationName = "demo"; extractor.RegistrationKey = "demo"; // Load PDF document // (!) We do not provide the sample document, please load your own. extractor.LoadDocumentFromFile("samplexfa.pdf"); // Enumerate XFA form content part types foreach (XFAFormContentType contentType in Enum.GetValues(typeof(XFAFormContentType))) { // Get count of content parts of specified type int partCount = extractor.GetCount(contentType); // Save parts as XML files for (int i = 0; i < partCount; i++) { string fileName = contentType.ToString() + i + ".xml"; extractor.SaveToFile(contentType, i, fileName); Console.WriteLine("Saved form part " + fileName); } } // Cleanup extractor.Dispose(); Console.WriteLine(); Console.WriteLine("Press any key to continue..."); Console.ReadLine(); } } }
60 Day Free Trial or Visit ByteScout Data Extraction Suite Home Page
Explore ByteScout Data Extraction Suite Documentation
Explore Samples
Sign Up for ByteScout Data Extraction Suite Online Training
Get Your API Key
Explore Web API Docs
Explore Web API Samples
60 Day Free Trial or Visit ByteScout Data Extraction Suite Home Page
Explore ByteScout Data Extraction Suite Documentation
Explore Samples
Sign Up for ByteScout Data Extraction Suite Online Training
Get Your API Key
Explore Web API Docs
Explore Web API Samples
also available as: