We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Exporting gantt to pdf in .net core

We would like to implement the exporting to pdf functionality of the Gannt control.
There are examples how to achieve this by using full .net framework. The client makes appropriate calls on the server and we found an example how to implement the server side code by using full .net framework.
Since we are using .net core, my question is if it is possible to implement that functionality by using .net core?
Can you please point me to the resources or examples how to implement that by using .net core?
If this is not possible, are there any plans to support this, and when?

3 Replies

GA Gurunathan A Syncfusion Team September 4, 2019 10:02 AM UTC

Hi Marko, 
Greeting from Syncfusion support. 
As per the provided information, we thought that you are using EJ1 Gantt(jQuery based), because in EJ1 platform only we are using server side libraries to perform export action. 
We already have support to perform PDF export action in Asp.Net Core platform for EJ1 Gantt, please find the demo link for this below. 
If you are using EJ2 Gantt(JavaScript based), currently we don’t have support to export Gantt as PDF file. We have already logged a feature request for this. You can track its status from below feedback link. 
In EJ2 platform, exporting performed in client-side only, we can perform this export action in .Net Core platform also. Currently we are working on this, it will implemented and included in our upcoming Volume 4, 2019 main release which is expected to be rolled out in December, 2019. 
Please let me know, if you require further assistance on this. 
Regards, 
Gurunathan 



MB Marko Bezjak September 20, 2019 08:50 AM UTC

We are using EJ1 Gantt (jQuery based, JavaScript). In order to export the PDF we have to use server side libraries.
My question is, can we use ASP.NET CORE server libraries to perform the export. For the scenario EJ1 Gantt (jQuery based, JavaScript) all the examples for server side libraries are for the full .net framework, I am searching for .net core ones. Can you please point me to the resources or examples for .net core?




GA Gurunathan A Syncfusion Team September 23, 2019 11:28 AM UTC

Hi Marco, 
 
Thanks for reply us. 
 
Syncfusion has exporting library which supports in Asp.Net Core platform, please refer the package link below. 
Using this package, we can export Gantt control data as Excel and PDF files. We have prepared a Gantt sample with Exporting functionalities in Asp.Net Core. 
In this sample we have rendered Gantt using jQuery without using Syncfusion.EJ.AspNet.Core library and added ActionMethod in controller to perform PDF Export action. 
We have called this action method on toolbarClick event using Export method in client side.  
 
Please find the below code example. 
 
[cs] 
public ActionResult ExportToPdf(string GanttModel) 
{ 
   PdfExport exp = new PdfExport(); 
   //... 
  return exp.Export(ganttProp, DataSource, pdfExp); 
} 
[cshtml] 
$("#GanttContainer").ejGantt({ 
//... 
toolbarSettings: { 
   showToolbar: true, 
   toolbarItems: [ 
       ej.Gantt.ToolbarItems.PdfExport, 
   ] 
}, 
toolbarClick: toolbarclick 
}); 
function toolbarclick(args) { 
   var id = $(args.currentTarget).attr("id"); 
   if (id == "GanttContainer_pdfExport") { 
         this.exportGrid("http://localhost:59419/Gantt/ExportToPdf", "", false); 
         args.cancel = true; 
   } 
} 
 
Please find the sample from below link. 
 
Is this your requirement? If not please share more details on your requirement. 
 
Regards, 
Gurunathan 
 


Loader.
Live Chat Icon For mobile
Up arrow icon