是否可以从我的数据库中存储的pdf
创建pdf-blob
文档?类似的东西:
function saveDatabaseBlob (blob) {
var doc = new jsPDF("portrait", "mm", "a4", "compressPdf");
doc.saveAs(blob, 'ZZZ.pdf');
}
答案 0 :(得分:0)
尝试
var a = document.createElement('a');
var file = new Blob(blob, { type : 'application/octet-stream' });
a.href = window.URL.createObjectURL(file);
a.download = 'file_output.pdf';
a.click(); //for download
使用Blob https://developer.mozilla.org/en-US/docs/Web/API/Blob