-
Notifications
You must be signed in to change notification settings - Fork 138
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
New output modes #92
base: gh-pages
Are you sure you want to change the base?
New output modes #92
Conversation
I'm proposing to add the "outputMode" setting (string), instead of "exportOnly" (boolean), because the latter only gave us 2 choices (download/print). To do the same as before, we only have to do the following changes : - exportOnly: false --> outputMode: 'print' - exportOnly: true --> outputMode: 'download'
Brings the possibility to get the image blob into the JS code. You can then use it to do whatever you want (display it in the page, send it to a server, ...)
I've just updated some references to the old setting (exportOnly) I hadn't seen previously. |
Hello, have you been able to read my PR ? |
Hi @alfredott since the PR isn't happening would you be able to integrate your changes into the bundle.js of your fork, please? |
Oops, I didn't get a notification for your answer @micahwilhelm I'm not quite sure I had the right I was actually directly using the index.js file (2 years ago), so I hadn't thought of updating I hope it helps someone, bye ! |
Hi !
This PR adds the possibility to switch between more than 2 output modes, and to use the image in the JS code.
It solves the following issues : #77, #68, #91, and any other issue that can be solved by getting the image from the JS code.
Technically :
First thing, I'm adding the "outputMode" setting (string), instead of "exportOnly" (boolean), because the latter only gave us 2 choices (download/print).
To do the same as before, we only have to do the following changes :
Second thing, I'm adding the 'event' option for the "outputMode" setting, so that we can get the image from anywhere in the JS code.
I also changed the Readme to be up to date with the new "outputMode" option.
I hope this PR can be accepted, feel free to tell me if you think I have to make some adjustments.
Bye !