Closed
Description
Thank you for submitting an issue to jsPDF. Please read carefully.
Are you using the latest version of jsPDF?
Yes (1.3.5)
Have you tried using jspdf.debug.js?
Yes
Steps to reproduce
- Add images to a jsPDF object that would generate a file string at around 384859244 characters. (~ 130 pages with full page canvas images generated via html2canvas)
- Save File.
- Observe Array.join error due to string being too long. (jspdf.debug.js; line 1051)
What I saw
The save function silently fails, and a console log error displays with an Invalid string length error:
index.js:2177 Error in function Array.join (native): Invalid string length RangeError: Invalid string length
at Array.join (native)
at buildDocument (jspdf.debug.js:1051)
at getArrayBuffer (jspdf.debug.js:1073)
at getBlob (jspdf.debug.js:1083)
at Object.<anonymous> (jspdf.debug.js:1112)
at Object.__safeCallWrapper [as output] (jspdf.debug.js:621)
at Object.API.save (jspdf.debug.js:2191)
What I expected
I expected the pdf file to save.