<!-- Copyright (c) 2021 ActivePDF, Inc. --> <!-- ActivePDF Toolkit 2018 --> <!-- Example generated 04/11/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"); // Open the PDF to read from intOpenInputFile = oTK.OpenInputFile(strPath & "xmpfields.pdf"); if(intOpenInputFile != 0) { Error("OpenInputFile", intOpenInputFile); } // Get the reference to the XMP object oXMP = oTK.GetXMPManager(); // Get a field instances from the XMP data oXMPField = oXMP.GetXMPFieldInfo("name"); // Get field properties and write them out strFieldInfo = oXMPField.Get_Name(); WriteOutput(strFieldInfo); strFieldInfo = oXMPField.Get_Type(); WriteOutput(strFieldInfo); strFieldInfo = oXMPField.Get_Value(); WriteOutput(strFieldInfo); longFieldInfo = oXMPField.Get_Instance(); WriteOutput(longFieldInfo); longFieldInfo = oXMPField.Get_PageNum(); WriteOutput(longFieldInfo); // Bottom left of the field with the height and width floatFieldInfo = oXMPField.Get_LLX(); WriteOutput(floatFieldInfo); floatFieldInfo = oXMPField.Get_LLY(); WriteOutput(floatFieldInfo); floatFieldInfo = oXMPField.Get_Width(); WriteOutput(floatFieldInfo); floatFieldInfo = oXMPField.Get_Height(); WriteOutput(floatFieldInfo); // Combo box or list box items list count // count will be 0 for other field types longFieldInfo = oXMPField.Get_ItemsSize(); WriteOutput(longFieldInfo); // For options available to dropdown fields strFieldInfo = oXMPField.GetDisplayValue(1); WriteOutput(strFieldInfo); strFieldInfo = oXMPField.GetExportValue(1); WriteOutput(strFieldInfo); // Close the input file oTK.CloseInputFile(); // Release Object oTK = 0; // Process Complete WriteOutput("Done!"); // Error Handling Function Error(method, outputCode) { WriteOutput("Error in " & method & ": " & outputCode); } </CFSCRIPT>