jsPDF tutorial to encode PDF document as BLOB using Base64 code and download it in a web browser using JavaScript.
var blobPDF = new Blob([ doc.output() ], { type : 'application/pdf'}); var blobUrl = URL.createObjectURL(blobPDF); //<--- THE ERROR APPEARS HERE window.open(blobUrl); // will open a new tab //window.open(blobUrl,'_system','location=yes'); will open a new window