-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Promise or callback after calling .save(filename)
or .output('save', filename)
#540
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
Comments
+1 |
3 similar comments
+1 |
+1 |
+1 |
Yeah that'd be great |
+1 Any update here? |
Would be neat to have this function. We would ideally want to redirect to another page only after the file has been created and saved to server as to avoid trying to access the file before it has been created. |
Although pull request by @raymondelferink shows as closed, jspdf.debug.js shows nothing related to a callback function for API.save can anyone confirm that a callback exists? |
Apparently there is no option to add a callback,, can anyone confirm this ? Thanks... |
@carlosalarconb Please see comment I am posting on PR #1159 |
added option returnPromise to save-method. will be part of next release. var doc = new jsPDF(); |
Instead use {usePromise: true}, you should use {returnPromise: true}. |
You are right. While in development I changed it to returnPromise. Thank you. I edited my previous answer. ;) |
For anyone else not super up to speed on promise logic/syntax, here's how I leveraged this (awesome) returnPromise bit:
|
Is there a way to fire a callback after the save action is complete? I'd like to only close a modal window after the file is "downloaded" so I need some way to act once it is complete.
I did see there is a PubSub class, how does that fit in to this library?
The text was updated successfully, but these errors were encountered: