IE9 – 函数错误:’ArrayBuffer’未定义ReferenceError:’ArrayBuffer’未定义

我已经创建了一个下载pdf的应用程序。 pdf基于html表。 应用程序在所有浏览器中都运行良好,但是当我在IE9中运行时,我Error in function : 'ArrayBuffer' is undefined ReferenceError: 'ArrayBuffer' is undefined遇到Error in function : 'ArrayBuffer' is undefined ReferenceError: 'ArrayBuffer' is undefined 。 由于IE9是基于HTML5的浏览器,jspdf应该可以工作。

工作演示

 function demoFromHTML() { var pdf = new jsPDF('p', 'pt', 'letter'); pdf.cellInitialize(); pdf.setFontSize(10); $.each($('#customers tr'), function (i, row) { if ($(row).text().trim().length !== 0) { $.each($(row).find("td, th"), function (j, cell) { var txt = $(cell).text().trim() || " "; var width = (j == 4) ? 40 : 70; if (j == 7) { width = 120; } if(i==0) { pdf.setFontStyle('bold'); } else { pdf.setFontStyle('normal'); } pdf.cell(10, 10, width, 18, txt, i); }); } }); pdf.save('sample-file.pdf'); } 

任何人都可以告诉我一些解决方案

使用以下代码启用downloadify:

    jsPDF        

jsPDF Downloadify Example

This is an example of jsPDF using Downloadify. This works in all major browsers.

You must have Flash 10 installed to download this file.

使用以下代码延迟加载Downloadify: