Syncfusion Dashboard With diffrent chart- wanted on demand server side rendring For PDf export.

Syncfusion Dashboard With diffrent chart- wanted on demand server side rendering For PDf export.


we have a report dashboard, which uses synfusion dashboard with several types for syncfusion chart, frontent is in angular and backend is in .net core 3.1, we want on demand rendering of dashboard in backend, to be able to export the same dashboard from backend as well. is it possible if yes, how it can be done.


2 Replies

MA Manoj July 29, 2021 05:22 AM UTC

for this we have tried QtBinariesWindows with syncfusion html to pdf converter. but getting blank pdf, event after waiting for some time for page load.

We have tried with blink binaries also.

Code  we are using is this

 [HttpGet("ExportToPDF")]

        public IActionResult ExportToPDF()

        {

            //Initialize HTML to PDF converter

            HtmlToPdfConverter htmlConverter = new HtmlToPdfConverter();

            WebKitConverterSettings settings = new WebKitConverterSettings();

            //Set WebKit path

            settings.WebKitPath = Path.Combine(hostingEnvironment.ContentRootPath, "QtBinariesWindows");

            //Assign WebKit settings to HTML converter

            htmlConverter.ConverterSettings = settings;

            //Convert URL to PDF

            PdfDocument document = htmlConverter.Convert("URL");

            MemoryStream stream = new MemoryStream();

            document.Save(stream);

            //document.Close(true);

            return File(stream.ToArray(), System.Net.Mime.MediaTypeNames.Application.Pdf, "Output.pdf");

        }

it would be good if there is any function where it wait for page to load fully,  we have tried some regarding that but still getting blank pdf




PV Prakash Viswanathan Syncfusion Team July 30, 2021 03:00 PM UTC

Hi Manoj, 

Thank you for contacting Syncfusion support.  

Our HTML to PDF converter will preserve the output PDF document like how the input URL is displayed on web browser. So, kindly check the input URL in rendered properly in private browser window. If the URL is rendered properly in browser, then it should be rendered in output PDF document. Please try the below steps and update the details, it will be helpful for us to analyse and assist you further on this.  

Convert any other URL (ex: https://www.google.com) to PDF in your application, so that we can conclude the issue with converter or with particular URL. 
Kindly convert the URL in standalone application, you can get the sample by installing the HTML converter. Please refer below link for download the HTML converter installer.  

Kindly trouble shoot the converter with our trouble shoot add-on, please refer below link.  

If still you are facing issue, kindly share us the input URL, HTML file, complete code snippet, product version, environment details such as OS, bit version, culture settings etc., 

Regards, 
Prakash V 


Loader.
Up arrow icon