<!-- Copyright (c) 2021 ActivePDF, Inc. --> <!-- ActivePDF Toolkit 2018 --> <!-- Example generated 03/05/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 & "XMPproperties.pdf"); if(intOpenInputFile != 0) { Error("OpenInputFile", intOpenInputFile); } // Get the reference to the XMP object oXMP = oTK.GetXMPManager(); // Get a document property strPropertyValue = oXMP.GetDocumentProperty(APToolkitNET.XMPProperty.Author); WriteOutput(strPropertyValue); // Get a custom property strPropertyValue = oXMP.GetCustomProperty("example"); WriteOutput(strPropertyValue); // Set the namespace for the user property oXMP.SetNamespace("dc", "http://purl.org/dc/elements/1.1/"); // Get a user property strPropertyValue = oXMP.GetUserProperty("contributor"); WriteOutput(strPropertyValue); // 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>