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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Exporting gantt to pdf in .net core

Thread ID:

Created:

Updated:

Platform:

Replies:

147148 Sep 3,2019 08:27 AM UTC Sep 23,2019 11:28 AM UTC ASP.NET Core - EJ 2 3
loading
Tags: Gantt Chart
Marko Bezjak
Asked On September 3, 2019 08:27 AM UTC

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?

Gurunathan A [Syncfusion]
Replied On 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 


Marko Bezjak
Replied On 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?



Gurunathan A [Syncfusion]
Replied On 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 
 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon