<!-- Copyright (c) 2021 ActivePDF, Inc. --> <!-- ActivePDF Toolkit 2018 --> <!-- Example generated 04/18/21 --> <!-- Example uses the .NET DLL which requires --> <!-- Coldfusion 8 or above --> <CFSCRIPT> // Get current path strPath = ExpandPath(".") & "\"; // Instantiate Object oTK = CreateObject(".NET", "APToolkitNET.Toolkit", "C:\Program Files\activePDF\Toolkit\DotNetComponent\2.0\APToolkitNET.dll"); // This example will take a filled PDF form and export the data to XML // Open the filled PDF form intOpenInputFile = oTK.OpenInputFile(strPath & "formx-filled.pdf"); if(intOpenInputFile != 0) { Error("OpenInputFile", intOpenInputFile); } // Extract the XML Data to a variable // Use the strXMLData variable to handle the XML data strXMLData = oTK.ExportFormAsXML("User", ""); // Close the filled PDF form oTK.CloseInputFile(); // Release Object oTK = 0; // Process Complete WriteOutput("Done!"); // Error Handling Function Error(method, outputCode) { WriteOutput("Error in " & method & ": " & outputCode); } </CFSCRIPT>