jszip icon indicating copy to clipboard operation
jszip copied to clipboard

ADD: Documentation Example

Open Aqua-4 opened this issue 6 years ago • 2 comments

FIX: Error: Invalid base64 input, it looks like a data url.

Example on how to work with canvas images.

code: var zip = new JSZip(); var img = zip.folder("images"); html2canvas(document.querySelector("#chart_placeholder_0")).then(canvas => { img.file("imr.png", canvas.toDataURL("image/png", [0.0, 1.0]).split(',')[1], { base64: true }); }); zip.generateAsync({ type: "blob" }).then(function (content) { saveAs(content, "example.zip"); });

Aqua-4 avatar Jul 14 '20 11:07 Aqua-4

Dupe of #694

Stuk avatar Jul 15 '20 19:07 Stuk

I have same question

sunshaobin avatar Mar 04 '21 03:03 sunshaobin