Using HtmlToPdfConverter in ASP.NET Core but cannot show any content in PDF file

I follow  this link https://help.syncfusion.com/file-formats/pdf/converting-html-to-pdf-in-asp-net-core to create a project.

But when I click "Convert PDF"  button , the PDF content is empty.

does anyone know what happen it is?

My source code :  https://github.com/vulcanlee/Syncfusion-sample

3 Replies 1 reply marked as answer

GK Gowthamraj Kumar Syncfusion Team January 20, 2021 12:40 PM UTC

Hi Vulcan, 
 
Thank you for contacting Syncfusion support. 

Our HTML converter may generate blank PDF while converting HTTPS sites to PDF. For converting HTTPS sites to PDF, WebKit rendering engine requires OPENSSL libraries. So, please make sure the OPENSSL assemblies are available in the machine where the conversion takes place. Please refer below links for more details,  
 
However, the below mentioned OPENSSL assemblies can be placed in the Windows system folder of the machine. (for 64-bit machine, it should be place in $SystemDrive\Windows\SysWOW64 and for 32-bit machine, it should be place in $SystemDrive\Windows\System32).  
  • libeay32.dll
  • libssl32.dll
  • ssleay32.dll
 
Please let us know if you need any further assistance with this. 
 
Regards, 
Gowthamraj K 


Marked as answer

GA Gaurang February 16, 2022 03:13 PM UTC

I have installed the Open SSL and then trying to convert html to pdf on blazor server application.

but it does not load the image. I have trying baseirl parameter as well.

the baseurl which I tried is like https://localhost:5001/  and c:\wwwroot] directory.



GK Gowthamraj Kumar Syncfusion Team February 17, 2022 01:49 PM UTC

Hi Gaurang, 
 
We have tried to reproduce the reported issue with test document on our end, but it is working properly and document generated. The image may missed in HTML string to PDF conversion, we need to specify the base URL if using HTML string to PDF approach. Please refer below links for more information, 
 
If you are facing HTTPS image URL in HTML String, the image may missed due to missing of OPENSSL assemblies. Our WebKit rendering engine required OPENSSL assemblies for accessing resources from HTTPS URL. So, kindly try the conversion with OPENSSL assemblies. Please refer below link for more information, 
 
We have attached the sample for converting Html to PDF document using Blazor application. Please try the sample with your input files on your end and let us know the result.   
 
Please refer the below link for more information,  
 
Note: After hosting the application, Go to Fetch data à Click Html to PDF button for conversion.    
 
If still you are facing the same issue, kindly provide more details such as modified sample or complete input HTML file/URL (with resource style, fonts, scripts , etc.,), complete code snippet, Environment details (OS, bit version, culture settings, RAM size, etc.,), product version to check the issue in our end. So, that it will be helpful for us to analyze and assist you further on this.    
 
Regards, 
Gowthamraj K 


Loader.
Up arrow icon