How to print Syncfusion charts on a razor page as PDF

Hello.
I am trying to get some Syncfusion Generated graphs on a PDF.
The idea is to make a weekly report and send it to users.
Are the charts on syncfusion.ej2 (ejs-charts, ejs-circulargauge)  compatible with the syncfusion.pfd.net.core library?
Thank you in advance.

4 Replies 1 reply marked as answer

SM Srihari Muthukaruppan Syncfusion Team February 9, 2021 10:51 AM UTC

Hi Jose, 
 
Please find the response for chart and circular gauge related queries. 
 
Chart: 
 
We have analyzed your query. From that, we can achieve your requirement using export method in the chart. We have also attached the demo sample link in which we can export the chart into PDF, PNG, SVG, and JPEG formats respectively. Please find the demo sample link below. 
 
 
 
 
Circular gauge: 
 
We can export the circular gauge control to PDF document using the export() method in the control. To export the gauge to PDF format, allowPdfExport property must be enabled in the Circular gauge control. Please find the API documentation for the export method of Circular gauge for more details below.  
 
 
We have created a simple ASP.NET Core application to demonstrate the same and it can be downloaded from the below link.

https://www.syncfusion.com/downloads/support/forum/162346/ze/Circulargauge1769522018

In the above sample, we have created the circular gauge with ranges and a button. When we click on the button, the circular gauge will be exported to PDF document.
 
 
Let us know if you have any concerns. 
 
Regards, 
Srihari M 



JP Jose Pablo February 11, 2021 06:13 PM UTC

Hello, thanks for your reply.

Is this way compatible with this tutorial?
Converting HTML to PDF with WebKit engine | Syncfusion

What I need is to generate one file with some charts and tables, but the method exposed generates a single file for each chart.
Is there a way to export all as a single file?


GK Gowthamraj Kumar Syncfusion Team February 12, 2021 12:31 PM UTC

Hi Jose, 
 
Thank you for contacting Syncfusion support.   
   
We can convert the HTML webpage into a Single PDF document using HTML to PDF document. It is a C# library. We have to install the package “Syncfusion.HtmlToPdfConverter.QtWebKit.Net.Core” or “Syncfusion.HtmlToPdfConverter.Blink.Net.Core.Windows“ for Net Core Application from nuget.org. WebKit/Blink rendering engine preserves the output PDF document like how the input HTML file/URL is displayed on the web browsers (safari, chrome). Please refer to the below link for more information,   
  
   
Currently, we are trying to create a sample for converting a webpage with Ej2 charts into a PDF document using the WebKit/Blink rendering engine on our end and we will update the further details on February 16th, 2021.    
 
Regards, 
Gowthamraj K 



GK Gowthamraj Kumar Syncfusion Team February 16, 2021 01:06 PM UTC

Hi Jose, 

Thank you for your patience. 

We have created a sample for converting a webpage with Ej2 charts into a PDF document using the Blink rendering engine on our end. We have attached the sample and output document for your reference. Kindly please try the below sample in your end and let us know the result. 


Note: Please copy and paste the BlinkBinariesWindows folder parallel to the project location. The BlinkBinariesWindows folder is available in the package installed location. Set the path of the BlinkBinaries folder from package location to the BlinkPath property of BlinkConverterSettings. This is mandatory to set BlinkPath property with BlinkBinaries folder, otherwise the converter will throw Blink assemblies are missing exception. 

Please let us know if you need any further assistance with this. 

Regards, 
Gowthamraj K 


Marked as answer
Loader.
Up arrow icon