Export chart to PDF with A4 size

Hi,

How do I export chart to a pdf with A4 size?

I've read the chart's export documentation about width and height but there is no example given how to set it.
I tried to set width and height using code below but the output is still using original width and height.

function ExportPDF() {
        var chart = document.getElementById('container').ej2_instances[0];
        chart.export('PDF', 'MyChart', 'Landscape', [chart], 1754, 1240);
    };

7 Replies

DG Durga Gopalakrishnan Syncfusion Team September 28, 2021 03:35 PM UTC

Hi RWEM, 
  
We are analyzing your required scenario. We will update the status within one business day(29th September, 2021). We appreciate your patience until then. 
  
Regards, 
Durga G 



HA Hafiz September 29, 2021 01:02 AM UTC

Hi Durga,


I've solved it but had to look at the source code and managed to set width/height using beforeExport function.
But as chart in the pdf is save as image, I end up using HtmlToPdfConverter as it save the chart in PDF as SVG.

Hope you can update your documentation about export function with example for the optional parameter without user having to look up the source code to figure it out.

Export.prototype.export = function (type, fileName, orientation, controls, width, height, isVertical, header, footer)


DG Durga Gopalakrishnan Syncfusion Team September 29, 2021 03:44 PM UTC

Hi RWEM, 

Thanks for an update. We will include about an export function with optional parameters in our documentation and we have logged task for this. The changes will be available in our upcoming weekly patch release which is scheduled to be rolled out on 12th October 2021. We will let you know once it will be refreshed in online. 

Regards, 
Durga G 



DG Durga Gopalakrishnan Syncfusion Team October 13, 2021 02:32 PM UTC

Hi RWEM, 

We are working on reported changes. The changes will be available in our upcoming Volume 3 SP 1 Release which is expected to be rolled out at mid of November, 2021. We will let you know once it is refreshed in online. 

Regards, 
Durga G 



DG Durga Gopalakrishnan Syncfusion Team November 17, 2021 03:00 PM UTC

Hi RWEM, 

We have completed the reported changes and it will be available in our upcoming weekly patch release which is scheduled to be rolled out on 23rd November, 2021. We will let you know once it will be refreshed in online. 

Regards,  
Durga G 



DG Durga Gopalakrishnan Syncfusion Team December 8, 2021 05:19 PM UTC

Hi RWEM, 

We will include this changes in our upcoming Volume 4 Main Release which is expected to be rolled out at end of December, 2021. We will let you know once it is refreshed in online. 

Regards,  
Durga G


DG Durga Gopalakrishnan Syncfusion Team December 21, 2021 03:11 PM UTC

Hi RWEM, 

Thanks for being patience.    
  
We have completed the reported changes and refreshed in live site. Please find the documentation link below.     
  
  
Kindly revert us if you have any concerns.    
  
Regards,   
Durga G 


Loader.
Up arrow icon