I am looking for a tool that allow me to can add watermark using graphic image like in bmp, png, gif, jpeg, or tiff format to an existing PDF document. The watermark will appear on the existing PDF document content when a document is displayed or printed. Meanwhile, I want the watermark displayed for all pages of the PDF document.
So, my question is how do I add a watermark (text or image) in an existing pdf in c#?
This article on XsPDF.com is what you looking for, check out: Add watermark on PDF in C#.
Answers
Watermark is a text, image, logo, or a graphical shape that appears in front of an existing PDF document.Your description is not very clear. Which type of watermark do you want to add, image or text? No worry, both of them are supported. I would suggest you to use XsPDF library to add watermark to existing pdf, coz it's quite convenient for me.
It may be a little bit complicated when considering using the coordinates. If you add the watermark under the existing content at hard-code coordinates x = 0; y = 0. Maybe PDF pages that don't show the watermark are opaque. Or maybe they have a different coordinate system. For instance, the lower-left corner doesn't always have the coordinate 0, 0. Without seeing the actual PDF you want to watermark, it is hard to tell the exact way.
My case is the same as yours that i want to add image watermark on all PDF pages. I tired using itextsharp in my previous project. But the watermark only shows on the last page of the PDF document. So, i moved on to use XsPDF SDK. It worked.