Closed neocotic closed 10 years ago
This would be good. The work around gives me this error at the moment.
TypeError: 'undefined' is not an object (evaluating 'c.toUpperCase')
I'm not familiar with the jsPDF library but I think it should work if you change line 39 to the following:
doc.addImage(dataUrl, 'JPEG');
Ah, that was a jsPDF error, sorry. Anyway, can't get it working in jsfiddle but it's fine now in my code. Thanks for the workaround.
More information: http://stackoverflow.com/questions/14383557/setting-canvas-todataurl-jpg-quality
It would make sense to support both the type (and quality?) parameters instead of only PNG.
Here's a currently workaround until this change is implemented, using JPEG as an example: