Convert Blob data to Raw buffer in javascript or node
问题 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:- var blob = new Blob([array], {type: "application/pdf"}); and further saves the blob data to local file system. Now instead of saving I need to print the PDF using plugin node-printer. Here is some sample code to do so var fs = require('fs'), var dataToPrinter; fs.readFile('/home/ubuntu/test.pdf', function(err, data){