I am using the following code to generate pdf in mvc using itext with razorpdf producer
@model myModel.Models.Examform
@{
Layout = null;
}
<itext creationdate="@DateTime.Now.ToString()" producer="RazorPDF">
Hello
</text>
This code works fine. I want to add a watermark to the generated pdf. I know how to add the image. I need a watermark which shows in the background.
this is pretty much the exact same question
ItextSharp - RazorPdf put image on Pdf
so using the answer there should work for you:
Edit: To overlay text on the image, you need to modify your CSS and HTML.
How to position text over an image in css
Add "Watermark" effect with CSS?
http://www.the-art-of-web.com/css/textoverimage/
You might need to put the CSS inline.