- Home
- Forum
- ASP.NET Core - EJ 2
- Syncfusion Dashboard With diffrent chart- wanted on demand server side rendring For PDf export.
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.
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
- 2 Replies
- 2 Participants
-
MA Manoj
- Jul 28, 2021 10:31 AM UTC
- Jul 30, 2021 03:00 PM UTC