File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -931,6 +931,10 @@ var jsPDF = (function(global) {
931931 * T* (line three) Tj
932932 * ET
933933 */
934+ function ESC ( s ) {
935+ s = s . split ( "\t" ) . join ( Array ( options . TabLen || 9 ) . join ( " " ) ) ;
936+ return pdfEscape ( s , flags ) ;
937+ }
934938
935939 // Pre-August-2012 the order of arguments was function(x, y, text, flags)
936940 // in effort to make all calls have similar signature like
@@ -970,14 +974,14 @@ var jsPDF = (function(global) {
970974 flags . autoencode = true ;
971975
972976 if ( typeof text === 'string' ) {
973- text = pdfEscape ( text , flags ) ;
977+ text = ESC ( text ) ;
974978 } else if ( text instanceof Array ) {
975979 // we don't want to destroy original text array, so cloning it
976980 var sa = text . concat ( ) , da = [ ] , len = sa . length ;
977981 // we do array.join('text that must not be PDFescaped")
978982 // thus, pdfEscape each component separately
979983 while ( len -- ) {
980- da . push ( pdfEscape ( sa . shift ( ) , flags ) ) ;
984+ da . push ( ESC ( sa . shift ( ) ) ) ;
981985 }
982986 text = da . join ( ") Tj\nT* (" ) ;
983987 } else {
You can’t perform that action at this time.
0 commit comments