Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
FDF stands for Forms Data Format, and an FDF file contains the form values in a key/value pair. We also know that XML file contains the values as tags. Where, mostly the key is represented as the tag name and value is represented as the value within that tag. Now, Aspose.Pdf.Facades provides us the flexibility to convert an FDF file format into an XML format.
We can use FormDataConverter class for this purpose. This class provides us different method to convert one data format into another format. In this article, we will just use one method named ConvertFdfToXml. This method takes FDF file as an input or source stream and saves it into XML format.
The following code snippet shows you how to convert an FDF file into an XML file:
// For complete examples and data files, visit https://github.com/aspose-pdf/Aspose.Pdf-for-.NET
private static void ConvertFdftoXml()
{
// The path to the documents directory
var dataDir = RunExamples.GetDataDir_AsposePdfFacades_TechnicalArticles();
// Create a file stream for FDF file - input file
using (var fdfInputStream = new FileStream(dataDir + "input.fdf", FileMode.Open))
{
// Create a file stream for XML file - output file
using (var xmlOutputStream = new FileStream(dataDir + "ConvertFdfToXML_out.xml", FileMode.Create))
{
FormDataConverter.ConvertFdfToXml(fdfInputStream, xmlOutputStream);
}
}
}
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.