Can't create instance of jsPDF class - Error : « jsPDF » is undefined - IE11

做~自己de王妃 提交于 2019-12-23 05:22:42

问题


I know it's close to these posts :

jsPDF is not supported in remote server for IE-11

I am generating a pdf file using jspdf library and I am getting the error "jspdf is not defined"

but since they are old unresolved topics, i'll up it here.

Here is my problem : I don't understand why I can't create a new instance of jsPDF. I'm using an existing library that I downloaded to be sure it was ok :

<script language="javascript" type="text/javascript" src="C:\Program Files (x86)\Apache Software Foundation\Tomcat 5.0\webapps\jsPDF-1.3.2\jspdf.js"></script>

And I get my error here :

var pdf = new jsPDF('p', 'pt', 'letter');

The call lacks one parameter but I figured it was not the source of the problem.

I tested on IE-11, and I can't change this (I mean I'm forced to get this working with IE, and with IE-8+ if possible - but sadly, I think it's impossible for IE-8 because it doesn't support totally html5 features).

If it is impossible to get jsPDF working with IE, do you have any other IE-compatible libraries that I could use to download a generated PDF file from styled html?


Thanks in advance for your help.

EDITs :
- tried shim, pointlessly.
- works perfectly in chrome.

来源:https://stackoverflow.com/questions/44719019/cant-create-instance-of-jspdf-class-error-jspdf-is-undefined-ie11

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!