Image img = tance(WatermarkLocation); img. SetAbsolutePosition(, ); // set the position in the document. I found the code for adding watermark to existing pdf file. instea PdfPTable headerTable = new ble(2);. // Creates. First off, yes, I know there are other tutorials on how to watermark PDF’s with iTextSharp. Unfortunately none of them showed me exactly what I.

Author: Duzahn Zular
Country: Malawi
Language: English (Spanish)
Genre: Science
Published (Last): 5 December 2010
Pages: 395
PDF File Size: 7.67 Mb
ePub File Size: 2.32 Mb
ISBN: 617-2-44028-324-3
Downloads: 59190
Price: Free* [*Free Regsitration Required]
Uploader: Zolozshura

One question though, is it possible to move the stamp so that it’s not right in the center of the page? After adding action link in the view run the web applicaiton and you will see the page looks like below. Existing Members Sign in to your account. Let’s work to help developers, not make them feel stupid. Insert watermark into pdf on mouse clicks. The time now is In this tutorial we show how to add a watermark to either a new or existing existing PDF wxtermark using iText and Java.

Fill in your details below or click an icon to log in:. You don’t need to do it while creating the PDF. Net] Add watermark to existing Pdf file using iTextSharp This itextshwrp been soooo helpful in a project that I’ve been working on. What I need to do, instead of using Helvetica on the above code of Stanav I will use Arial font as a Base Font of the text in my watermark.


Thanks a ton for the self answer, it works perfectly.

Provide an answer or move on to the next question. I would be shocked if they had removed it.

Add watermark to pdf file created at run time using itextsharp | The Forums

Notify me of new comments via email. Don’t tell someone to read the manual. This example also creates a PDF document, but instead we include page events.

If your use case is take an existing PDF and watermark ityour solution is appropriate. How to change the font name? I am in the process of building 10 more nice applications that can be of use to lot of people. Have you tried looking in the assembly using reflector? Having said that, you can simply create a new temp file, and once done, you delete the original and rename the temp file to the exiting name.

Open the controller Home from controller folder in MVC application and add the following ActionResult method in the page. Thanks You can always use a VB to C converter.


Watermark examples

Originally Posted by mestrini. The sixth and last argument is the rotation of the text.

I made it in asp. So I spent some spare time writing some code to do it using the free iTextSharp library, and here it is, the 2 subroutines for adding an image and text as the watermark on each page of a pdf file. Can’t you just lay down the watermark on each page after you’ve made it? Done it by myself.

I’m very new to iTextSHarp. PdfStamper reader, new System. What I want to do is use the Agaramond-Pro font for the text and the data that I’m going to insert has italic data in between of the normal text?

SetTextMatrix 30, 30. This entry was posted in Uncategorized. When answering a question please: