Stretched layout Jspdf

Asked

Viewed 182 times

0

I started using Jspdf, and while my page has little content, everything goes smoothly, but if it is large, the layout distorts, someone knows why?

Follow the image and the code below

inserir a descrição da imagem aqui

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 found out it’s because of pagesplit: true, if I declare as false, works fine, however, it doesn’t create new pages if the content is large. Someone knows how to solve?

1 answer

0


I found out it’s because of pagesplit: true, if I declare as false

Browser other questions tagged

You are not signed in. Login or sign up in order to post.