Rank: Newbie Groups: Member
Joined: 12/13/2011 Posts: 7
|
Hello,
I need to insert signature image almost at the end of the rendered PDF document, but before the final disclaimer dynamically from inside the code. I am able to calculate Last Position and apply the formula to insert the image above the last lines of text. My isssue is that the image is cut off if the page is almost at the bottom. I could not find any example of the code (Not HTML page-brake properties) that will help me in this solution. Any advise will be graetly inticipated.
image2 = m_bitmap;
imageContent2 = new AcmImage(image2); if (lastPosition <= (float)2.2) { renderBottom = new AcmRender(doc.Pages[lastPageIndex], lastPosition); } else { renderBottom = new AcmRender(doc.Pages[lastPageIndex], lastPosition - (float)2.2);
} renderBottom.Render(imageContent2);
Thank You
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
The best way to do that is to through HTML to PDF. If you do it through HTML to PDF, you can just place the signature in as an image element before the disclaimer and apply "page-break-inside:avoid" on the image. You can even insert the image through JavaScript if the image needs to be inserted dynamically. Our HTML to PDF converter will run all JavaScript code in your page.
If you have to do it through AcmRender, then you will still need to place a "signature holder" (for example, a DIV) in your HTML to reserve the space for the signature image and apply "page-break-inside:avoid" on that DIV. This is necessary to make sure the signature space and the last line of text are pushed together the next page if there isn't enough space on the previous page for the signature.
Thanks!
|