Pivot table export to PDF as blob data

I'm trying to get the exported pivot table as blob data using the methods below by passing "isBlob: true". However I'm not getting the response as blob. Please advise.

 

Console:


Reference:

https://ej2.syncfusion.com/javascript/documentation/api/grid/#pdfexport
https://ej2.syncfusion.com/javascript/documentation/api/pivotview#pdfexport


1 Reply

AP AngelinFaithSheeba PaulvannanRajadurai Syncfusion Team June 15, 2022 01:21 PM UTC

Hi Simon,


Kindly use “excelExportComplete” event to get the blob data while excel exporting. Please refer to the following code example.


Code Example:


var pdfExpComplete = (args=> {

  //This event will be triggered when excel exporting.

  args.promise.then((e=> {

    //In this `then` function, we can get blob data through the arguments after promise resolved.

    console.log(e.blobData);

  });

};

 

document.getElementById('export').onclick = function () {

  pivotObj.grid.pdfExportComplete = pdfExpComplete;

  pivotObj.pdfExport(nullnullnulltrue);

};


Meanwhile, we have prepared a sample for your reference.


Sample: https://stackblitz.com/edit/tawnli-2fpndi?file=index.html,index.js


Please let us know if you need further assistance with this.


Regards,

Angelin Faith Sheeba.


Loader.
Up arrow icon