<!-- Copyright (c) 2021 ActivePDF, Inc. --> <!-- ActivePDF Server 2013 --> <!-- Example generated 04/15/21 --> <!-- Example uses the .NET DLL which requires --> <!-- Coldfusion 8 or above --> <CFSCRIPT> // Get current path strPath = ExpandPath(".") & "\"; // Instantiate Object oSVR = CreateObject(".NET", "APServer.Server", "C:\Program Files\activePDF\Server\bin\APServer.Net35.dll"); // Set the basic metadata in the created PDF oSVR.SetMetadata("John Doe", "examples, samples, metadata", "Examples", "activePDF Metadata Example"); // Convert XPS file into PDF results = oSVR.ConvertXPSToPDF(strPath & "XPS.xps", strPath & "metadata.pdf"); if(results.Get_ServerStatus() != "Success") { Error("ConvertXPSToPDF", results, results.Get_ServerStatus()); } // Release Object oSVR = 0; // Process Complete WriteOutput("Done!"); // Error Handling Function Error(method, oResults, errorStatus) { WriteOutput("Error with " & method & ": <br/>" & errorStatus & "<br/>" & oResults.Get_details()); } </CFSCRIPT>