jspdf autotable - Something happened and PDFs no longer open in new browser tab -


i running pdf-autotable v2.3.2 alongside jspdf v1.3.3 in reactjs app. have changed no code, pdfs used show in new chrome tab (and beautiful, btw) no longer display.

the tab opens title untitled, url data:application/pdf;base64,jvberi0xljmkmyawig9iago8pc9uexblic9...(thousands of characters)...ci9caxrzugvyq29tcg9uzw50idgkl0zpbhrlciavrenurgvjb2rlci9mzw5ndgggndaymj4+cnn0cmvhbqr/2p/habhfeglmaabjssoacaaaaaaaaaaaaaaa/+waeur1y2t5aaeabaaaadwaap/hazfodhrwoi8vbnmuywrvymuuy29tl3hhcc8xljavadw/ehbhy2tldcbizwdpbj0i77u/iibpzd%e2%80%a6%e2%80%a6 , empty web page.

my pdf/autotable code is:

  printgrid() {     let doc = new jspdf('landscape');     const totalpagesexp = "{total_pages_count_string}";      let pagecontent = function (data) {          // header         doc.setfontsize(20);         doc.settextcolor(40);         doc.setfontstyle('normal');         doc.addimage(getbase64imgglobal(), 'jpeg', data.settings.margin.left, 15, 10, 10);         doc.text(fullreportname, data.settings.margin.left + 15, 22);          // footer         var str = "page " + data.pagecount;         if (typeof doc.puttotalpages === 'function') {             str = str + " of " + totalpagesexp;         }         doc.setfontsize(10);         doc.text(str, data.settings.margin.left, doc.internal.pagesize.height - 10);     };      let _this = this;      doc.autotable(this.getpdfcolumns(), this.getpdfdata(), {         addpagecontent: pagecontent,         margin: {top: 30},         createdheadercell: function(cell, data) { _this.aligncol(cell, data) },         createdcell: function(cell, data) { _this.aligncol(cell, data) }     });      if (typeof doc.puttotalpages === 'function') {         doc.puttotalpages(totalpagesexp);     }      doc.setproperties({       title: fullreportname     });      doc.output('dataurlnewwindow');   }; 

i commented out own code , pasted in simplest example:

var columns = ["id", "country", "rank", "capital"]; var data = [     [1, "denmark", 7.526, "copenhagen"],     [2, "switzerland",  7.509, "bern"],     [3, "iceland", 7.501, "reykjavík"],     [4, "norway", 7.498, "oslo"],     [5, "finland", 7.413, "helsinki"] ];  var doc = new jspdf(); doc.autotable(columns, data); doc.output("dataurlnewwindow"); 

and exact same thing happened. help, please.


Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -