Watermark when printed

Watermark when printed

Forum member · Nov 3, 2010
Hello, How can I insert a watermark (stamp) into my pdf, only to be shown when pdf is printed? Watermark or text like "Copy printed 2010-11-03". Can I also have todays date added automatically to watermark when printed?

Re: Watermark when printed

Support · Nov 3, 2010
Hello, There is nothing in the Merger API that will let you add the watermark or text that will show up only when you print the document. You can achieve this with a combination of DynamicPDF PrintManager and DynamicPDF Merger if your application that displays the PDF document also handles printing the document. Once you display the document in your application and when the user clicks on the print button capture the print event and load the same document in the memory again and add the watermark/text to the PDF in memory and create a PrintJob using the PrintManager API and print to the printer. Thanks, ceTe Software Support Team.

Re: Watermark when printed

Forum member · Nov 7, 2010
Hi We use tempates to add a watermark to pdf's public static void SetWaterMark(ceTe.DynamicPDF.Document document, string text) { if (text == null || document.Pages.Count < 1) return; Page p1 = document.Pages[0]; document.Template = new Template(); OpenTypeFont openTypeFont = new OpenTypeFont("verdanab.ttf"); const float x = 100f; const float y = 30f; float rotation = 55f; if (p1.Dimensions.Width > p1.Dimensions.Height) rotation = 30f; const float width = 840f; const float heigth = 100f; RgbColor waterMarkColor = new RgbColor(200, 200, 200); Label waterMark = new Label(text, x, y, width, heigth, openTypeFont, 72f, TextAlign.Center, waterMarkColor); waterMark.Angle = rotation; document.Template.Elements.Add(waterMark); } Thomy

Re: Watermark when printed

Support · Nov 8, 2010
Hello, To clarify our previous post, you can add a water mark to the document using the Merger API, but it will appear on the document when you print and/or view the document. It is not possible to just add the water mark only when the document is printed using the Merger API. Thanks, ceTe Software Support Team.