You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are a couple canvas APIs that could be nice to expose, specifically toDataURL and toBlob, primarily to do something with the canvas data (most obvious is download the file).
I would be very interested in having access to the toDataURL API. I'm working on a project to generate a page full of unique QR codes to push into a PDF File. I'm planning on using jsPDF which has the following sample code (https://parall.ax/products/jspdf) for putting an image into a PDF:
// You'll need to make your image into a Data URL
// Use http://dataurl.net/#dataurlmaker
var imgData = <SNIPPED for brevity>
var doc = new jsPDF()
doc.setFontSize(40)
doc.text(35, 25, 'Paranyan loves jsPDF')
doc.addImage(imgData, 'JPEG', 15, 40, 180, 160)
There are a couple canvas APIs that could be nice to expose, specifically
toDataURL
andtoBlob
, primarily to do something with the canvas data (most obvious is download the file).I'm thinking perhaps something like this:
This sidesteps the problem of having to figure out how to get the non-default args for those calls without ballooning the component API.
I'm not sure if anybody cares but figured I'd post this idea now before I forget (instead of just shipping it at midnight with very little thought)
(back here on this because of #19 and re-reading #17)
The text was updated successfully, but these errors were encountered: