Rank: Newbie Groups: Member
Joined: 8/17/2014 Posts: 6
|
There are missing footer in EO20 version. This code was working properly in old version. Any advise?
The following are the code that I used to convert HTML to PDF. EO.Pdf.HtmlToPdf.Options.PageSize = EO.Pdf.PdfPageSizes.A4 EO.Pdf.HtmlToPdf.Options.OutputArea = New RectangleF(0.0F, 0.0F, 8.3F, 11.7F) AddHtmlFooter(noticeId, documentRunNo, NoticeName) HtmlToPdf.ConvertHtml(HTMLString, PDFFileName)
This is the footer code function Sub AddHtmlFooter(Optional ByVal NoticeId As String = "", Optional ByVal documentrunNo As String = "", Optional ByVal NoticeName As String = "")
EO.Pdf.HtmlToPdf.Options.FooterHtmlFormat = "<div style='position: absolute; top: 30.2cm; left: 6.6cm; width: 16.9cm; height: 19px; line-height: 0.45cm; text-align: center;' >" + _ "<span style='font-family: Helvetica; font-size: 8pt; font-weight: 100; '> Page {page_number} of {total_pages}</span> " + _ " <span style='font-family: Helvetica; font-size: 7pt; font-weight: 100; '>" & NoticeId & "</span> " + _ " <span style='font-family: Helvetica; font-size: 8pt; font-weight: 100; '>" & documentrunNo & " </span> " + _ "</div> "
End Sub
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
Hi,
Please do not use absolute positioning in your footer HTML. The new version merges all footers and render them all together inside a single document. So it's much faster than old versions that render each footer separately in its own document. However merging all footers in a single document would not work with absolute positioning because obviously all footers will be rendered at exactly the same place in that case. So you must modify your code to not to use absolute positioning.
Thanks!
|