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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Charts not visible when exporting to PDF

Thread ID:





141021 Nov 19,2018 02:26 PM UTC Nov 23,2018 08:41 AM UTC ASP.NET MVC - EJ 2 5
Tags: XlsIO
Asked On November 19, 2018 02:26 PM UTC


I have successfully created and saved a XLSX file (first attachment). The same document should be provided as PDF from the Customer Area.

When I use Export, I can't see the charts (second attachment).

This is the code I have used:

                            ExcelToPdfConverter converter = new ExcelToPdfConverter(workbook);
                            //ExcelToPdfConverter converter = new ExcelToPdfConverter(workbook.Worksheets[0]);  //same thing if I export the single sheet...
                            ExcelToPdfConverterSettings cSettings = new ExcelToPdfConverterSettings();
                            cSettings.LayoutOptions = LayoutOptions.FitAllColumnsOnOnePage;

                            //Initialize PDF document
                            PdfDocument pdfDocument = new PdfDocument();
                            //Convert Excel document into PDF document
                            pdfDocument = converter.Convert(cSettings);

                            var pdfName = @"\" + guid.ToString() + ".pdf";
                            var fulldocname = saveDir + TEMP_REPOSITORY_FOLDER + pdfName;


Based on documentation, 2D and 3D charts should be exported.

What's the matter?


Attachment: Downloads_92875559.zip

Prakash Kumar D [Syncfusion]
Replied On November 20, 2018 06:46 AM UTC

Thank you for contacting Syncfusion support. 
To preserve the charts during Excel To PDF conversion, initialize the ChartToImageConverter of IApplication interface otherwise the charts present in worksheet gets skipped. The following code illustrates how to convert an Excel with chart to PDF document. 
Code Example: 
application.ChartToImageConverter = new ChartToImageConverter(); 
To know more about this, pleaser refer the following UG link 
Prakash Kumar 

Replied On November 20, 2018 04:24 PM UTC

Hi, Prakash Kumar

thank you for the support.
In order to initialize the ChartToImageConverter, must I update my libraries to the last version?
I'm using version of Essential Studio. (ASP.NET MVC EJ1)


Claudio Riccardi

Prakash Kumar D [Syncfusion]
Replied On November 21, 2018 06:55 AM UTC

Hi Claudio, 
To initialize the ChartToImageConverter, you have to refer the assembly (Syncfusion.ExcelChartToImageConverter.WPF) / NuGet package (Syncfusion.ExcelChartToImageConverter.WinForms.nupkg) 
Please refer the following link about assemblies required to convert chart in XlsIO 
Please refer the following link about NuGet package required to convert chart in XlsIO 
Please let us know if you need further assistance on this. 
Prakash Kumar 

Replied On November 23, 2018 08:26 AM UTC

Thankk you for the support.

Problem solved!

Best Regards.


Prakash Kumar D [Syncfusion]
Replied On November 23, 2018 08:41 AM UTC

Hi Claudio, 
Thank you for updating us. 
We are glad that your issue is resolved. Please get back to us if you need further assistance. 
Prakash Kumar 


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