Hi,
I tried to plug in your sample code to use the after render page to make some changes to my headers and I am receiving a syntax error on the setting of the options.AfterRenderPage to pdfPgeEventHandler(On_AfterRenderPage) setting.
my code to set the option is:
Code: Visual Basic.NET
HtmlToPdf.Options.AfterRenderPage = New PdfPageEventHandler(On_AfterRenderPage)
The On_AfterRenderPage in the parenthesis is underlined in blue and the error is: 'pdfpageeventhandler' is a delegate type and requires a single 'address of' expression as the only argument to the constructor.
and my sub code is:
Code: Visual Basic.NET
Private Sub On_AfterRenderPage(ByVal sender As Object, ByVal e As EO.Pdf.PdfPageEventArgs)
'Set the output area to the top portion of the page. Note
'this does not change the output area of the original
'conversion from which we are called
EO.Pdf.HtmlToPdf.Options.OutputArea = New RectangleF(0, 0, 8.5F, 1.0F)
'Render an image and a horizontal line. Note the
'second argument is the PdfPage object
EO.Pdf.HtmlToPdf.ConvertHtml(vbCr & vbLf & _
" <img src='http://www.essentialobjects.com/images/logo.gif' >" & vbCr & vbLf & _
" <br />", _
e.Page)
End Sub
Can you see what I am doing wrong?
Thanks,
Becky