Welcome Guest Search | Active Topics | Sign In | Register

Watermarks Options
Scott
Posted: Thursday, October 1, 2015 4:40:49 PM
Rank: Newbie
Groups: Member

Joined: 10/1/2015
Posts: 3
Hello, I am using the HtmlToPdf method provided by Essential Objects to create a .pdf from my html string. My client is asking for a watermark to appear at the end of the page if and only if there is blank space there. This is not a watermark that appears across the entire page, only the blank portion of the page.

So what I need to do is somehow determine if there is any blank space on the last page in the .pdf and if so, add a watermark otherwise don't add it as I don't want the watermark to create it's own page unnecessarily.

Is this possible?

Thanks,

Scott
eo_support
Posted: Thursday, October 1, 2015 5:49:14 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,070
Hi,

When you call HtmlToPdf.ConvertHtml, it will return a HtmlToPdfResult object. You can check that object's LastPosition property to determine if you have enough blank space on the last page. That property returns the end position in inch on the last page.

Thanks!
Scott
Posted: Monday, October 5, 2015 1:42:38 PM
Rank: Newbie
Groups: Member

Joined: 10/1/2015
Posts: 3
That worked great, thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.