如何在pdf文件中添加水印图像 [英] How to add watermark image in pdf file
问题描述
我有使用asp.net在pdf中插入水印文本的代码,但我想在我的pdf文件中插入水印图片帮助我....
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....
推荐答案
您必须使用itextsharp.dll ...
以下是在pdf中应用水印的一些示例。
You have to use itextsharp.dll for in ..
Here is some example for applying watermark in pdf.
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);
}
您可以点击以下链接获取更多详情
http://stackoverflow.com/questions/ 2372041 / c-sharp-itextsharp-pdf-creation-with-watermark-each-pages-pages [ ^ ]
HTTP://www.bluelemoncode .com / post / 2011/12/21 /使用-tixtSharp-with-aspnet-to-add-watermark-in-pdf-file.aspx [ ^ ]
http://nilthakkar.blogspot.in/2013/12/itextsharpadd-watermark-to-pdf.html [ ^ ]
问候,
AARIF SHAIKH
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
水印PDF文档使用HttpHandlers [ ^ ]
这篇关于如何在pdf文件中添加水印图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!