示例#1
0
        static void Main(string[] args)
        {
            string strPath =
                System.AppDomain.CurrentDomain.BaseDirectory.Replace("\\", "/");

            // Instantiate Object
            APServer.Server server = new APServer.Server();

            // Setup the FTP request supplying credentials if needed
            server.AddFTPRequest(hostAddress: "#.#.#.#", targetDirectory: "/folder");
            server.SetFTPCredentials(user: "******", password: "******");

            // Set which files will upload with the FTP request
            // To attach a binary file use AddFTPBinaryAttachment
            server.FTPAttachOutput = true;
            server.AddFTPAttachment(Filename: $"{strPath}Server.Input.ps");

            // Convert the PostScript file into PDF
            ServerDK.Results.ServerResult result =
                server.ConvertPSToPDF(
                    PSFile: $"{strPath}Server.Input.ps",
                    PDF: $"{strPath}Server.UploadFTP.pdf");

            // Output result
            WriteResult(result);

            // Process Complete
            Console.WriteLine("Done!");
            Console.WriteLine("Press any key to exit.");
            Console.ReadKey();
        }