Tabulator: How do i get pdf and xls blob from tabulator

Created on 25 Apr 2019  路  6Comments  路  Source: olifolkerd/tabulator

Is it possible to get PDF and xlsx blobs with version 4.2

All 6 comments

That is when you trigger download. I wanted to get it like
table.getblob() or table.getPdfBlob() without triggering download.

You are going to download it/ move it at some point aren't you?
If not what do you plan to do with the blob?
You could also look here:
https://github.com/olifolkerd/tabulator/blob/master/src/js/modules/download.js
and use that to create your own variation.

You can trigger a download, get the blob and return false. This will stop it from actually downloading but you can still get the data. I do this same pretty effectively for serving content to Google Drive.

Inside tabulator constructor you can;

downloadReady: function (fileContents, blob) {
                    //fileContents - the unencoded contents of the file
                    //blob - the blob object for the download

                    //custom action to send blob to server could be included here

                   // sendEmailVB(blob);

                    window.open(window.URL.createObjectURL(blob));

                    return blob; //must return a blob to proceed with the download, return false to abort download
                },

Thanks guys... return false helped

Was this page helpful?
0 / 5 - 0 ratings

Related issues

aballeras01 picture aballeras01  路  3Comments

jiaqianliCn picture jiaqianliCn  路  3Comments

yaxino picture yaxino  路  3Comments

soo1025 picture soo1025  路  3Comments

cemmons picture cemmons  路  3Comments