Click here to Skip to main content
15,883,819 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
I am new to jsPDF and I am trying to download the highchart with some html content. My code works fine for all browser except "Above Microsoft Edge 20.0 versions".

What I have tried:

Here is the working Plunker. I have googled similar questions but none of them talk about edge browser, additionally, I have tried using png image instead of JPEG like this but no luck.

Note: I have tried passing directly image url to .addImage() function which works fine with all browser.

Can someone please point me, what I am missing or doing wrong?
Posted
Updated 7-Feb-17 2:14am

I found one issue. Code was not working on IE 11. Now it is working. But I see another error in edge. I think you need to report a bug on plugin site. Here - Issues · MrRio/jsPDF · GitHub[^]
'RGBColor' is undefined

And if you check the canvg.js file, there is a line written.
JavaScript
* Requires: rgbcolor.js - http://www.phpied.com/rgb-color-parser-in-javascript/
So, include the js file http://www.phpied.com/files/rgbcolor/rgbcolor.js[^] and enjoy.
 
Share this answer
 
Comments
CodeReady 6-Feb-17 4:39am    
Thanks Tadit!! I included this js, though the error is gone but still having the issue. Find my plunkr https://plnkr.co/edit/cYGfIvIiGwxD0ZirWYzp?p=info
CodeReady 6-Feb-17 7:19am    
I am still struggling with this issue, please let me know if I can provide more information.
Any more exception or error in console?
CodeReady 7-Feb-17 8:10am    
No Exception or error. I have found a workaround for that and also reported a issue in github.
Thanks for looking into this issue @Tadit. I got the workaround for this problem.

The problem is related to an Edge-Canvas issue, I suppose.

Instead of SVG->Canvas, I used SVG->Blob->Image->Canvas approach.
Here is the updated Plunkr.
 
Share this answer
 
Comments
That's good news. :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900