Welcome Guest Search | Active Topics | Sign In | Register

Add extra information only on the footer of the last page Options
den_bin
Posted: Thursday, January 23, 2014 12:34:05 PM
Rank: Newbie
Groups: Member

Joined: 1/23/2014
Posts: 1
How to add extra information on the footer of the last page only
so far i did

HtmlToPdfOptions.Options.Pagesize = new System.Drawing.SizeF(...);
HtmlToPdfOptions.Options.OutputArea = new System.Drawing.RectangleF(...);
HtmlToPdfOptions.Options.FooterHtmlFormat = ...all the footer info
HtmlToPdfResult result = HtmlToPdf.ConvertHtml("your_main_content_html", PdfDocument)
MemoryStream output = new MemoryStream();
result.PdfDocument.Save(output);
output.Position = 0;
return File(output, "application/pdf");

I want to add one extra information on the last page footer.
How to Do it???
eo_support
Posted: Thursday, January 23, 2014 2:10:51 PM
Rank: Administration
Groups: Administration

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

You would do something like this:

Code: C#
HtmlToPdf.ConvertHtml("something", doc.Pages[docs.Pages.Length - 1]);


Note the second argument is a PdfPage object instead of a PdfDocument object. You would still use HtmlToPdf.Options.OutputArea to set the output area, which would determine where the HTML goes.

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.