-
Notifications
You must be signed in to change notification settings - Fork 4.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
.html() not working at all? #2487
Comments
The same is happening to me. I have tried using older versions but still the same. Probably some Chrome update? |
@andmaltes, do you mean older version of jsPDF or of html2canvas? I suspect it's a change to the html2canvas API, but I hadn't considered that it would be a browser thing. |
@eKoopmans Could use your help on this one, if you have time. |
Same problem here, doesn't work on Edge either, so it doesn't seem to be browser-specific at least. The callback function of .html() never gets called. |
I encountered this as well. Installing the latest version oh html2canvas was also giving me a blank pdf, downgrading html2canvas to |
The last correctly working version of html2canvas is RC1. Downgrade to that one and it should work as expected. |
Is this because the onrendered callback has been replaced with a promise? RC2 of html2canvas added a deprecation warning with that option and has been removed in RC3 |
As @arasabbasi answered in this closed issuehttps://github.com//issues/2479 it might be due to CORS, you nedd to have both libraries (html2canvas and jspdf ) in the same server or folder |
@IndigoParadise It is definitely not a CORS issue. CORS does not apply to javascript included in a script element the page - as demonstrated by every CDN in existence. Also, as @hakimio points out, downgrading to html2canvas RC1 works fine, even if its hosted elsewhere. What @steebwba said sounds plausible, but src/modules/html.js:271 sure looks like the current code is already using promises, and if jsPDF is passed a callback in onrendered, it pulls that out of the html2canvas options and invokes it separately. |
Now i know its because the html2canvas rc2 and 3 do not currently work with jsPDF, try downgrading the version |
Some news here ? |
This issue is stale because it has been open 90 days with no activity. It will be closed soon. Please comment/reopen if this issue is still relevant. |
still having an issue with this. went through several docs but pdf generated is still a blank page |
Even I got this issue.. I downgraded to the RC1 version and working fine now. |
The .html() method from the html2pdf plugin doesn't work in Chrome or Firefox, at the moment, including the demo in the jspdf source. Page loads, blank PDF generated.
Try: https://cdn.rawgit.com/MrRio/jsPDF/master/examples/html2pdf/showcase_supported_html.html
My own app that uses this method behaves similarly.
The text was updated successfully, but these errors were encountered: