During testing, the HTML Converter flawlessly converts the current ASPX page into a PDF version. However, when I upload all my files to the server and run from outside the network, it only shows a blank page.
When I log on to the server and test with internal browser, it works fine. But when I use an outside browser, it all shows up blank.
How can I get the PDF from the live site?
Dim htmlconverter As New HtmlToPdfConverter(HtmlRenderingEngine.WebKit)
Dim settings As New WebKitConverterSettings
settings.WebKitPath = Server.MapPath("/QtBinaries")
settings.AdditionalDelay = 4000
settings.PdfPageSize = PdfPageSize.Letter
settings.MediaType = MediaType.Print
settings.WebKitViewPort = New Drawing.Size(800, 0)
htmlconverter.ConverterSettings = settings
Dim urltoconvert As String = HttpContext.Current.Request.Url.AbsoluteUri
Dim document As PdfDocument = htmlconverter.Convert(urltoconvert)
document.Save("Sample.pdf", Response, HttpReadType.Open)
document.Close()
Hi Chris,
Thank you for contacting Syncfusion support.
The reported blank page issue may occurs due to missing of OPENSSL assemblies in the server. HTML to PDF converter with WebKit rendering engine requires OPENSSL assemblies for converting HTTPS URL to PDF. So, kindly ensure the server contains OPENSSL assemblies. Please refer below link for more information about OPENSSL,
UG: https://help.syncfusion.com/file-formats/pdf/convert-html-to-pdf/webkit#openssl
If you have permission to install OPENSSL, you can copy the files from your development environment to server. We need to copy the below files from development environment to server machine.
Kindly refer trouble shooting section for more information,
https://help.syncfusion.com/file-formats/pdf/convert-html-to-pdf/webkit#troubleshooting
Regards,
Prakash V
Thanks for the quick response. Everything works fine if I give it an outside web address (https://www.google.com) but it doesn't work if I give it an address from within IIS (https://mywebsite/report.aspx)