When there are many images (about 25 and more), output to a new tab doesn't work. Instead, browser crashes (chrome). Browser crashes in both cases: doc.output('dataurlnewwindow'); and var string = doc.output('datauristring'); var x = window.open(); x.document.open(); x.document.location=string;