I know it is possible to render "Page X of Y" in a header/footer using the C# API like this:
//write the page number
TextElement footerText = new TextElement(0, pdfConverter.PdfFooterOptions.FooterHeight - 15, "This is page &p; of &P; ",
new System.Drawing.Font(new System.Drawing.FontFamily("Times New Roman"), 10, System.Drawing.GraphicsUnit.Point));
footerText.EmbedSysFont = true;
footerText.TextAlign = HorizontalTextAlign.Right;
pdfConverter.PdfFooterOptions.AddElement(footerText);
..but i'd rather position and style it directly in html using:
HtmlToPdfElement footerHtml = new HtmlToPdfElement(pdfOptions.DocumentFooterHtmlString, pdfOptions.BaseUrl);
footerHtml.FitHeight = true;
pdfConverter.PdfFooterOptions.AddElement(footerHtml);
where pdfOptions.DocumentFooterHtmlString looks something like this:
<div class="clearfix">
<span class="pull-right">This is page &p; of &P;</span>
</div>
Is this something that is possible? If I try this I just get the: This is page &p; of &P; rendered in the footer.
It looks like you can do this. See http://www.evopdf.com/demo/PDF_Creator/Headers_and_Footers/Page_Numbers_in_HTML.aspx
In the sample code Evo Provides they use HtmlToPdfVariableElement.