|
Rank: Newbie Groups: Member
Joined: 4/2/2013 Posts: 4
|
Please how do I render a water mark on my pdf page, I have a html, that I want to convert to pdf, I followed the instructions about the "BeforeRender" event but it still puts my image as a rubber stamp Please help me
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Hi,
You will have to modify your HTML body element to apply CSS background image in order to render watermark. The HTML document is not transparent (it always has a white background). So it is not possible to render anything below it and still visible.
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 4/2/2013 Posts: 4
|
Thank you for your reply, I styled my html, with an image as you directed setting the opacity of the image to be 0.3, when I wrote this code in C#
Public void CreatePdf(){ PdfDocument doc = new PdfDocument(); EO.pdf.htmlToPdf.ConvertUrl("my/html/file/path", doc); doc.save("C:\test.pdf"):
}
It applied the water mark feature, but it only applied it on page 1 of the generated pdf, pages 2 - end, do not apply the water mark feature,
Please help me.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Hi,
You will have to repeat your background images. Note that it does not necessary repeat on PDF page. For example, if a full PDF page is 800 pixel and your background image is 600 pixel and you repeat, then the second repetition of your background image will be cut at 200 pixel.
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 4/2/2013 Posts: 4
|
Thank you for your reply, I have repeated the image and noticed what you told me to take note of about the cutting of image, but even with that, when I run my program, the repeated image shows on page 1 of the pdf and doesn't show from page 2, am really confused and don't know what to do again *sad**
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Hi, We have tested the following code and it works fine:
Code: HTML/ASPX
<body style="background-image:url(http://www.google.com/images/srpr/logo4w.png); background-repeat:repeat">
<div style="width:100;height:2000"></div>
</body>
You can try to run this page through our demo application and you will see the background image (in this case Google's logo) is rendered on the second page. Thanks!
|
|