please verify to8bitStream function in jspdf.js. the function has return statement at the end return String.fromCharCode.apply(undef, newtext); but there's no 'undef' variable.