简体   繁体   中英

jspdf, add new page, coordinates

I am using jspdf for html to pdf conversion.

First page is rendering the content perfectly. But when it comes to second page, when I use doc.cell(10, 10, cellWidth, 10, txt, j); it is displaying in the middle of the page instead to appear at the start.

If I use doc.text(10.10,"value") its appearing at the right coordinates.

Please help me.

To add the contents to another page simply do

doc.addPage() 

Example suppose you have two pages

 doc.text(10.10,"value")  //this will bne in the first page

 docaddPage() //this adds another page

 doc.text(10.10,"value") // this will be in page2

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM