javascript - How do I get page breaks when using the text function in jsPDF? -


i trying print content of textarea pdf file (i.e. text, not html). content may or may not greater 1 page in length when printed. currently, code looks this:

var doc=new jspdf(); doc.text(10,10,inputtexthere); doc.save('file.pdf'); 

this overflows bottom of page when inputtexthere long. there way jspdf automatically page break when text reaches end of page? have tried use pagesplit: true option, not work argument in text function.

edit: have managed achieve wanted using jspdf-autotable, using single titleless column single row containing data (i.e. 1 cell content in), , options theme: 'plain', pagebreak: 'always', styles: {overflow: 'linebreak'}. however, still know if have been achieved in jspdf alone.


Comments

Popular posts from this blog

html - How to set bootstrap input responsive width? -

javascript - Highchart x and y axes data from json -

javascript - Get js console.log as python variable in QWebView pyqt -