I started using JSPdf, and while my page has little content, everything happens smoothly, but if it is large, the layout distorts, does anyone know why?
Follow the image and the code below
let doc = new jsPDF('p','pt','a4');
let options = {
format: 'PNG',
pagesplit: true
}
doc.addHTML($('#draft')[0], 0, 0, options, function(){
doc.output('dataurlnewwindow')
})
Update: I discovered that it's because pagesplit: true
, if I declare it as false
, works fine, but does not create new pages if the content is large. Anyone know how to fix it?