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

networking - Vagrant-provisioned VirtualBox VM is not reachable from Ubuntu host -

c# - ASP.NET Core - There is already an object named 'AspNetRoles' in the database -

ruby on rails - ArgumentError: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true -