Dear visitor, despite the COVID-19 outbreak, our team continues operating at full speed.

Also, here is the form where you can apply for a special discount and we will contact you with possible options. Stay safe and continue achieving your business goals.

Fill the form
Get Free Trial
Get Free Trial

How to export multiple pivot-grid into single pdf file

Abudhahir asked on January 4, 2019

We are loading multiple pivot-grid at the same component in Angular. So, we need to export(PDF) all these grids in one pdf file. How to achieve this?
 
I have tried the following, but couldn’t get it. Please reply asap.
  
exportPDF(){
var doc=newjsPDF(‘l’, ‘pt’);
let docList= [];
// ‘multi_pivotGrid’ holds many flexmonster pivot-grid.
for (leti=0; i<multi_pivotGrid.length; i++) {
let flexmonster=multi_pivotGrid[i].flexmonster;
flexmonster.exportTo(“pdf”, { destinationType:”plain” }, function (res) {
var pdf=res.data;
docList.push(pdf);
doc=Object.assign({}, doc, pdf); // Didn’t worked.
if (multi_pivotGrid.length==docList.length) {
doc.save(“AllPivotGrids_pdf”); // Here, we need actual flexmonster ‘doc’
}
else
doc.addPage();
});
}
}

Attachments:
PDF_multi-pivot.PNG

1 answer

Public
Tanya Gryshko Flexmonster January 4, 2019

Hello, Abu,
Thank you for writing to us.
Please have a look at the following JSFiddle example: https://jsfiddle.net/flexmonster/82vt1y0z/. It shows how to export two pivot instances to one PDF file. The same approach can be applied to multiple instances as well.
Please inform me if it helps.
Regards,
Tanya

Please login or Register to Submit Answer