error when export chart to PDF, not all CHART are exported

Hi all,
I've one dashboard page with all my graphs, I wold like to export my page as PDF.
To do this I've used this code:

document.getElementById('button').onclick = () => {

var chart1 = document.getElementById('ctn_CodNeg').ej2_instances[0];

var chart2 = document.getElementById('ctn_MovMag').ej2_instances[0];

var chart3 = document.getElementById('ctn_Variance').ej2_instances[0];

var chart4 = document.getElementById('ctn_Variance').ej2_instances[0];

var chart5 = document.getElementById('ctn_Price').ej2_instances[0];

chart1.exportModule.export('PDF', 'chart', 'Portrait', [chart1,chart2,chart3,chart4,chart5]);

};

as you can see in the attached files (dashboard page and his pdf exported) in all my tests I can't export more than 3 charts, it's a script limit or there is a way to export the page as the user see on the browser?

Thanks for any suggestions.
Fabriizo


Attachment: chart_9b40aff2.zip


5 Replies

VN Veerakumar Narayanasamy Syncfusion Team April 14, 2025 12:05 PM UTC

Hi Fabrizio,

We have received your query regarding the issue with multiple charts not being exported to PDF. Upon inspection, we found that the orientation was specified using a string value, which is not applicable.

The orientation should be defined using binary values instead.

  • To export the pdf in ‘Portrait’ mode pass the 0 as the argument.
  • To export the pdf in ‘Landscape’ mode pass the 1 as the argument.

We have attached a sample for your reference.


Please feel free to reach out if you have any questions or concerns.


Regards,

Veerakumar N.




Attachment: ExportMulti_b35f24ae.zip


FC fabrizio carboni replied to Veerakumar Narayanasamy April 14, 2025 02:19 PM UTC

Ciao 

as you wrote I've changed the argument from ‘Portrait’ to 0, but, at the same time I get a horizontal print with only 3 graphs.
I include in the attachment the two PDF (Portrait & Landscape mode) and the cshtml code of my page.

Can be that the problem is on the ejs-dashboardlayout??
thanks

fabrizio


Attachment: Graph_output_8bf23bb0.zip


VN Veerakumar Narayanasamy Syncfusion Team replied to fabrizio carboni April 16, 2025 12:48 PM UTC

Hi Fabrizio,


Thank you for your update and for sharing the additional details and attachments.

We have recreated the scenario using your provided code and integrated it within a Dashboard Layout component, but we were unable to replicate the issue—multiple charts are exporting correctly in our test environment.

To help us investigate further, we kindly request you to review the attached working sample and let us know if you encounter the same issue with it. Additionally, please provide the following details so we can assist you more effectively:

  • The version of the Syncfusion packages you're currently using
  • A video illustration showing the issue you're experiencing during export

This information will help us narrow down the cause and provide a more targeted solution.


Regards,

Veerakumar N.


Attachment: Export_Dashboard_77d04195.zip


FC fabrizio carboni April 27, 2025 02:30 PM UTC

Hi  Veerakumar,

I saw your example and I've tested it without success, the problem is when there are twoor more columns in the same row.
I've updated your example and I've added two columns on the 1th row so you can see the output when export script run.
In the accached zip I've added one folder "output" with two pdf :

  1. Export_AsIs.pdf
    1. the pds exported with your code, you can see that each box is exported in one distinct row
  2. Export_ToBe.pdf
    1. te aspected pdf file where the layout is the same on the browser page  

Attachment: Dynamic_series_8d5f8065.zip


VN Veerakumar Narayanasamy Syncfusion Team April 28, 2025 12:23 PM UTC

Hi Fabrizio,


We have analyzed your reported query based on that we regret to inform you that we currently do not have support to achieve your requirement. Therefore, we have considered your reported scenario as improvement and logged a feature request on this. Based on other logged tasks priority, we will include this improvement in any of our upcoming release. You can keep track of an improvement from the feedback portal below. 


Feedbackhttps://www.syncfusion.com/feedback/67250/need-to-provide-support-to-export-pdf-with-layouts


If you have any more specification/precise replication procedure or a scenario to be tested, you can add it as a comment in the portal.


Regards,

Veerakumar N.


Loader.
Up arrow icon