I have a internal web page that is dynamically created with varying amounts of data so length can be quite long.
I can convert the page to a PDF and display it but it is only creating 1 page, whereas there should be 8 or 9.
It seems to just render over the top of itself on the first page.
Any idea what I am doing wrong?
Dim htmlConverter As New HtmlToPdfConverter(HtmlRenderingEngine.WebKit)
Dim webKitSettings As New WebKitConverterSettings()
webKitSettings.WebKitPath = Request.PhysicalApplicationPath & "\bin\QtBinaries"
htmlConverter.ConverterSettings = webKitSettings
Dim myWriter As TextWriter = New StringWriter()
Dim htmlWriter As New HtmlTextWriter(myWriter)
Server.Execute("~/mypage.aspx", myWriter)
Dim document As PdfDocument = htmlConverter.Convert(myWriter.ToString(), Request.Url.AbsoluteUri)
document.DocumentInformation.CreationDate = DateTime.Now
Dim ms As New System.IO.MemoryStream()
document.Save(ms)