HtmlToPdfConverter with BlickConverterSettings create Blank PDF

Hello,

I am using Syncfusion HtmlToPdfConverter with BlinkConverterSettings to convert a URL to PDF. It is working fine on my local but when I deploy it on my shared hosting (IONOS), it returns a blank page, please help me with it.

Here is what I am doing, you can also test it.

string url = "https://develop.softwareansar.de/Reporting/ExportReportHtml/3000?lang=urdu";

HtmlToPdfConverter htmlConverter = new HtmlToPdfConverter(HtmlRenderingEngine.Blink);                    BlinkConverterSettings blinkConverterSettings = new BlinkConverterSettings();
blinkConverterSettings.MediaType = MediaType.Print;
blinkConverterSettings.ViewPortSize = new System.Drawing.Size(850, 0);
htmlConverter.ConverterSettings = blinkConverterSettings;
//Convert URL to PDF document.
PdfDocument document = htmlConverter.Convert(url);
document.PageSettings.Size = PdfPageSize.A4;
PdfPage page = document.Pages[0];
MemoryStream stream = new MemoryStream();
string fileName = "Report.pdf";
document.Save(stream);
return File(stream.ToArray(), System.Net.Mime.MediaTypeNames.Application.Pdf, fileName);

Thanks and Regards,
Hamid Mahmood


3 Replies

AM Arumugam Muppidathi Syncfusion Team February 12, 2025 01:13 PM UTC

Hi Hamid,


Thank you for reaching out to Syncfusion support.

Currently, we are setting up the similar environment to check this and we will update further details on February 14th, 2025.


Regards,

Arumugam M



AR Arumugam February 14, 2025 06:14 PM UTC

Hi Hamid,


After conducting further analysis, we have confirmed that the HTML to PDF conversion is functioning properly both locally and on a fresh virtual machine. Currently, we are in the process of testing the HTML to PDF conversion on the IONOS server, and we will provide additional details on this by February 18th, 2025. 


In the meantime, we kindly request that you share a sample or the complete code snippet along with the steps to reproduce the issue. This will greatly assist us in analyzing the problem and enabling us to provide you with a prompt solution. Furthermore, we suspect that the reported issue could be caused by an incorrect or inaccessible URL or web page. 


Please ensure that the web page does not require authentication, and confirm that it is not a dynamic page that takes a long time to load, as this could lead to a blank PDF being generated. Additionally, please verify that your environment is not blocking internet access during the conversion process.


 As a troubleshooting step, we recommend testing the conversion with a simple Google URL to see if the issue persists. We look forward to your response and will continue working to resolve the matter.


Regards,

Arumugam M



AM Arumugam Muppidathi Syncfusion Team April 15, 2025 01:44 PM UTC

Hi Hamid,


Thank you for your continued patience.


Upon further analysis, we were unable to create an IONOS server environment to replicate the reported issue. As this is not a commonly supported or widely used setup, we kindly request access to you to provide the temporary access from your IONOS server to help us reproduce and investigate the issue more effectively. 

 

Having access to the actual environment will greatly assist us in analyzing the problem and providing you with a prompt and accurate solution.


We look forward to your response.


Regards,

Arumugam M


Loader.
Up arrow icon