当我尝试在PDF中保存HTML时,它会给出错误行号139'jsPDFhtmlText'在IE中未定义,它与mozilla运行良好。
答案 0 :(得分:1)
你能否出示你的代码。您将无法在IE 8-9中保存PDF。您必须使用与JSPDF一起提供的downloadify插件
Downloadify.create('downloadify',{
filename: 'Example.pdf',
data: function(){
var doc = new jsPDF();
doc.text(20, 20, 'PDF Generation using client-side Javascript');
doc.addPage();
doc.text(20, 20, 'Do you like that?');
return doc.output();
},
onComplete: function(){ alert('Your File Has Been Saved!'); },
onCancel: function(){ alert('You have cancelled the saving of this file.'); },
onError: function(){ alert('You must put something in the File Contents or there will be nothing to save!'); },
swf: '../libs/downloadify/media/downloadify.swf',
downloadImage: '../libs/downloadify/images/download.png',
width: 100,
height: 30,
transparent: true,
append: false
});