static void Main(string[] args) { string strPath = System.AppDomain.CurrentDomain.BaseDirectory.Replace("\\", "/"); // Instantiate Object APServer.Server server = new APServer.Server(); // Stamp Images and Text onto the output PDF server.AddStampCollection("TXTinternal"); server.StampFont = "Helvetica"; server.StampFontSize = 108; server.StampFontTransparency = 0.3f; server.StampRotation = 45.0f; server.StampFillMode = ADK.PDF.FontFillMode.FillThenStroke; server.StampColorNET = new ADK.PDF.Color() { Red = 255, Green = 0, Blue = 0, Gray = 0 }; server.StampStrokeColorNET = new ADK.PDF.Color() { Red = 100, Green = 0, Blue = 0, Gray = 0 }; server.AddStampText( x: 116.0f, y: 156.0f, stampText: "Internal Only"); // Set whether the stamp collection(s) appears in the background or // foreground server.StampBackground = 0; // Convert the PostScript file into PDF ServerDK.Results.ServerResult result = server.ConvertPSToPDF( PSFile: $"{strPath}Server.Input.ps", PDF: $"{strPath}Server.AddStampText.pdf"); // Output result WriteResult(result); // Process Complete Console.WriteLine("Done!"); Console.WriteLine("Press any key to exit."); Console.ReadKey(); }
static void Main(string[] args) { string strPath = System.AppDomain.CurrentDomain.BaseDirectory.Replace("\\", "/"); // Instantiate Object APServer.Server server = new APServer.Server(); // Create a stamp collection for the image stamp server.AddStampCollection(collectionName: "IMGimage"); // Add an image stamp to the lower right corner of each page. server.AddStampImage( ImageFile: $"{strPath}Server.ImageInput.jpg", x: 508.0f, y: 50.0f, Width: 64.0f, Height: 64.0f, PersistRatio: true); // Set whether the stamp collection(s) appears in the background or // foreground server.StampBackground = 0; // Convert the PostScript file into PDF ServerDK.Results.ServerResult result = server.ConvertPSToPDF( PSFile: $"{strPath}Server.Input.ps", PDF: $"{strPath}Server.AddStampImage.pdf"); // Output result WriteResult(result); // Process Complete Console.WriteLine("Done!"); Console.WriteLine("Press any key to exit."); Console.ReadKey(); }