Click here to Skip to main content
15,886,109 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have code to insert watermark text in pdf using asp.net but i want to insert watermark image in my pdf file help me pls....
Posted

You have to use itextsharp.dll for in ..
Here is some example for applying watermark in pdf.

C#
iTextSharp.text.Image img = iTextSharp.text.Image.GetInstance(WatermarkLocation);
    img.SetAbsolutePosition(125, 300); // set the position in the document where you want the watermark to appear (0,0 = bottom left corner of the page)



    PdfContentByte waterMark;
    for (int page = 1; page <= pdfReader.NumberOfPages; page++)
    {
        waterMark = stamp.GetOverContent(page);
        waterMark.AddImage(img);
    }


You can follow below link for more details

http://stackoverflow.com/questions/2372041/c-sharp-itextsharp-pdf-creation-with-watermark-on-each-page[^]

http://www.bluelemoncode.com/post/2011/12/21/Using-iTextSharp-with-aspnet-to-add-watermark-in-pdf-file.aspx[^]

http://nilthakkar.blogspot.in/2013/12/itextsharpadd-watermark-to-pdf.html[^]


Regards,
AARIF SHAIKH
 
Share this answer
 
Comments
ManiTamilan 20-Aug-15 2:59am    
thank u..
 
Share this answer
 
Comments
ManiTamilan 20-Aug-15 2:57am    
thank u..
Most welcome. Please accept the answer.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900