0
试图使用jsPDF我收到错误jspdf和CKEditor的 - .createObjectURL不是一个函数
Error in function saveAs: n(...).createObjectURL is not a function
我的代码很简单:
HTML
<button class="generatePdf"> click me </button>
JS
//Generate PDF
$(document).on('click', '.generatePdf', function() {
var doc = new jsPDF();
doc.text(20,20,'Some dummy text');
doc.save('print.pdf')
});
我用它在Laravel与鲍尔和药剂(大口),但我得到了同样的错误:使用
<script src="http://mrrio.github.io/jsPDF/dist/jspdf.debug.js"></script>
我接受的替代jsPdf如果你有任何
Error in function [email protected]://mrrio.github.io/jsPDF/dist/jspdf.debug.js:5875:18: get_URL(...).createObjectURL is not a function
如果。 它发生在这两个火狐44.0.2和铬48.0.2564.116
我在看这个https://github.com/eligrey/FileSaver.js/issues/143,发现问题是CKEditor已经定义了'URL'对象。评论出ckeditor使一切工作。但是我需要CKEditor,所以我仍然在研究这个。 – dbr