JSpdf working in Internet Explorer but not working in Chrome

2.7k views Asked by At

Hi I am a bit stuck here, trying to use jspdf for printing html to pdf. So first of all I tried with some examples and it worked. But when I try to implement the same in My Django Website, there is an issue.

1. Its working with Internet explorer, I am able to download the Pdf

2. But same is not working with Chrome (why).

By following some post :get_URL().createObjectURL error I was able understand that:

issue is with the AJax Calls where i am changing the URL to some other value.

Also looked in to :window.URL.createObjectURL(blob); is undefined in my application

But it doesn't says any clear solution to the problem. How to make the things work.

So far I have checked : None of the JS files inclusion is missed , as its working fine with internet explorer. But in Explorer my ajax Calls doesn't works

Here is the error I am getting enter image description here

Any help would be appreciated :)

1

There are 1 answers

0
16patsle On

Not sure if I can help much, but what I understand is that the error you are seeing is caused by createObjectURL being undefined, so the first thing I would check is why this happens.

Have you tried writing something like window.ULR.createObjectURL(new Blob) in the console? Try writing this on your application page, and if it stil happens, you have something that changes the URL object.

The next step would be to temporarily remove one javascript file at a time to find out which one makes the trouble.

Note: Yes, I know the question is old, but it still deserves a solution.