Convert Blob data to Raw buffer in javascript or node

后端 未结 3 1380
猫巷女王i
猫巷女王i 2021-02-09 04:55

I am using a plugin jsPDF which generates PDF and saves it to local file system. Now in jsPDF.js, there is some piece of code which generates pdf data in blob format as:-

<
3条回答
  •  旧时难觅i
    2021-02-09 05:11

    Try:

    var blob = new Blob([array], {type: "application/pdf"});
    var buffer = new Buffer(blob, "binary");
    

提交回复
热议问题