ByteScout PDF Suite - C# - Convert PDF XFA Form To XML 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 PDF Suite – C# – Convert PDF XFA Form To XML with PDF Extractor SDK

  • Home
  • /
  • Articles
  • /
  • ByteScout PDF Suite – C# – Convert PDF XFA Form To XML with PDF Extractor SDK

How to convert PDF XFA form to XML with PDF extractor SDK in C# with ByteScout PDF Suite

This code in C# shows how to convert PDF XFA form to XML with PDF extractor SDK with this how to tutorial

The code displayed below will guide you to install an C# app to convert PDF XFA form to XML with PDF extractor SDK. 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. It can convert PDF XFA form to XML with PDF extractor SDK in C#.

The SDK samples given below describe how to quickly make your application do convert PDF XFA form to XML with PDF extractor SDK in C# with the help of ByteScout PDF Suite. 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.

ByteScout PDF Suite free trial version is available on our website. C# and other programming languages are supported.

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 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(); } } }

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