Welcome Guest Search | Active Topics | Sign In | Register

Determine element position in last PDF page Options
dm
Posted: Friday, September 27, 2013 2:36:16 PM
Rank: Newbie
Groups: Member

Joined: 8/9/2013
Posts: 6
I am converting aspx page to pdf. There are textarea html elements which dynamically grow as you type (using jquery plugin). So there could be 1 pdf page or 10 pages because of the dynamic textareas. I need to place digital signature into pdf after the last textarea on the last pdf page. The digital signature api takes x,y coordinates (I know I know lame right?). So I'm thinking find last textarea element position then insert digital signature after it? Or if I can have a footer only on the last pdf page and add digital signature here I think this would work. Any other suggestions?
eo_support
Posted: Friday, September 27, 2013 2:52:16 PM
Rank: Administration
Groups: Administration

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

Yes. You will need to handle the control's AfterRender event. Inside the event you will need to get the HtmlToPdfResult object:

http://www.essentialobjects.com/doc/1/eo.web.aspxtopdf.afterrender.aspx

Once you have that object, you can do something like this:

Code: C#
//Get the HtmlElement object. There are a number of GetElementByXXX
//methods, you can check the documentation to see which one fits you 
//the best
HtmlElement e = result.HtmlDocument.GetElementById(element_id);

Once you have the HtmlElement, you can use the element's Location and Size to determine the exact location (page index, x/y location) and size of the element.

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.