We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

HTML to PDF only creating 1 page

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()

3 Replies

AS Abirami Selvan Syncfusion Team April 20, 2016 11:19 AM UTC

Hi Jamie,
Thank you for contacting Syncfusion support.

We have already fixed this issue in our latest version . We suggest you to upgrade the Essential Studio to latest version( to get this issue fixed. Please let us know if you need any further assistance, 

JA jaykay April 28, 2016 01:29 PM UTC

Yes for some reason I was referencing an old version, thanks for the point in the right direction. All working now :)

AS Abirami Selvan Syncfusion Team April 29, 2016 04:19 AM UTC

Hi Jamie,
Thank you for your update. Please let us know if you need any further assistance.

Live Chat Icon For mobile
Up arrow icon