Yagnesh.Dixit
Yagnesh.Dixit

Reputation: 318

Watermark and print pdf file C# asp.net 4.0

I have a pdf file stored at some location on my server. On click of a link I want to add a text-watermark to this pdf file and then print it.

something like this:

in aspx say we have a (button a link-button or a simple link)

     <a id="abc" href="../test.pdf" onclick="watermarkAndPrintPdf()"> PrintPdf </a>
     or
     <asp:linkbutton id="abc" runat="server" onclick="watermarkAndPrintPdf()" Text="Print Pdf"/>

Now when user click this link my code should add watermark(which will probably the loged-in user name) and print this document.

I want to know what ['watermarkAndPrintPdf()'] this function will be.......

Note:-It is a web application in C# asp.net 4.0. (I don't mind if print dialog box opens or It prints without it.)

Please help....

Upvotes: 0

Views: 2918

Answers (1)

CryoFusion87
CryoFusion87

Reputation: 796

would suggest taking a look at PDFsharp it's an open source dll for producing pdf's through code, there are a number of examples of producing a watermark on this page of the PDFsharp website:

http://www.pdfsharp.com/PDFsharp/index.php?option=com_content&task=view&id=40&Itemid=51

If you need any help using it I am more than willing to lend a hand as I have used this package to produce pdf's in the past.

hope this helps.

Upvotes: 1

Related Questions