jsPDF is a low-level library for building PDF files in JavaScript. It does not support multiline text.
Here's a complete helper function based on the answers by @KB1788 and @user3749946 in this StackOverflow thread:
It includes line wrap, page wrap, and some styling control: