Welcome Guest Search | Active Topics | Sign In | Register

EO.PDF Dynamic document total pages Options
Ibiuna
Posted: Saturday, October 1, 2011 6:57:44 PM
Rank: Advanced Member
Groups: Member

Joined: 8/31/2011
Posts: 34
Hi,

My report is generated dinamically creating a single document that is saved several times using diferent sets of configurations and pages.
I use the following footer:

HtmlToPdf.Options.FooterHtmlFormat = "<div style=\"width:1046px; margin-left:60px; border-top:thin solid #333300; float:left;\"><div style=\"text-align:left;float:left;font-family:Arial;font-size:12px;\">Ibiuna Investimentos</div><div style=\"text-align:right;float:right;font-family:Arial;font-size:12px;\">Page {page_number}/{total_pages}</div></div>";

But the total number of pages and the page number are wrong because the document is saved several times.

Is there a way for me to input the footer after I saved all the parts of the document ? Because, only then I will now how many pages there are.

Thanks
eo_support
Posted: Sunday, October 2, 2011 11:01:17 AM
Rank: Administration
Groups: Administration

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

Take a look of HtmlToPdfOptions.FirstPageNumber and see if that's what you are looking for. If it is not, then you will need to render footer and header yourself instead of using the built-in FooterHtmlFormat property.

Thanks!
Ibiuna
Posted: Monday, October 3, 2011 8:12:49 PM
Rank: Advanced Member
Groups: Member

Joined: 8/31/2011
Posts: 34
Ok,

HtmlToPdf.Options.FirstPageNumber helped me with the {page_number} part, but as you said, i'll have to render the footer by myself to get the {total_pages}.

Thank you for the support !


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.