pdf - JSON to jsPDF addPage() -


i'm using mvc , trying export pdf file action returns json. working fine, until de size bigger page, it's exporting 1 page in pdf, 23 rows of json (who has 149). when try addpage() i'm getting new blank page empty , need .text inside it!

    function exportarpdfclientes()     {            var pdf = new jspdf();      pdf.setfontsize(15);     pdf.addpage();      $.ajax     ({         url: '../sfi_clientes/buscarclientespdf',         type: 'post',         async: false     }).done(function (response)     {         $.each(response, function (index, item)         {             = + 6;             id = item.id_cliente;             nombre = item.nombre;             idvendedor = item.id_vendedor;             pdf.settextcolor(0, 0, 0);             pdf.setfontsize(11);             pdf.text(10, i, id);             pdf.text(40, i, nombre);             pdf.text(160, i, idvendedor);             pdf.line(10, i2, 190, i2);             if (i%240 == 0)             {                 pdf.addpage();             }                     })     });      //pdf.output('dataurlnewwindow');     pdf.save('two-by-four.pdf'); } 


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -