<!-- Copyright (c) 2021 ActivePDF, Inc. --> <!-- ActivePDF Server 2013 --> <!-- Example generated 04/17/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"); // Setup the FTP request supplying credentials if needed oSVR.AddFTPRequest("127.0.0.1", "/folder"); oSVR.SetFTPCredentials("user", "pass"); // Set which files will upload with the FTP request // To attach a binary file use AddFTPBinaryAttachment oSVR.Set_FTPAttachOutput(true); oSVR.AddFTPAttachment(strPath & "file.txt"); // Convert the PostScript file into PDF results = oSVR.ConvertPSToPDF(strPath & "PS.ps", strPath & "ftp.pdf"); if(results.Get_ServerStatus() != "Success") { Error("ConvertPSToPDF", results, results.Get_ServerStatus()); } // Options available to clear or remove FTP requests are only // needed if the object remains instantiated. oSVR.RemoveFTP("127.0.0.1", "/folder"); oSVR.ClearFTPAttachments(); oSVR.ClearFTPs(); // 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>