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) {
931
931
* T* (line three) Tj
932
932
* ET
933
933
*/
934
+ function ESC ( s ) {
935
+ s = s . split ( "\t" ) . join ( Array ( options . TabLen || 9 ) . join ( " " ) ) ;
936
+ return pdfEscape ( s , flags ) ;
937
+ }
934
938
935
939
// Pre-August-2012 the order of arguments was function(x, y, text, flags)
936
940
// in effort to make all calls have similar signature like
@@ -970,14 +974,14 @@ var jsPDF = (function(global) {
970
974
flags . autoencode = true ;
971
975
972
976
if ( typeof text === 'string' ) {
973
- text = pdfEscape ( text , flags ) ;
977
+ text = ESC ( text ) ;
974
978
} else if ( text instanceof Array ) {
975
979
// we don't want to destroy original text array, so cloning it
976
980
var sa = text . concat ( ) , da = [ ] , len = sa . length ;
977
981
// we do array.join('text that must not be PDFescaped")
978
982
// thus, pdfEscape each component separately
979
983
while ( len -- ) {
980
- da . push ( pdfEscape ( sa . shift ( ) , flags ) ) ;
984
+ da . push ( ESC ( sa . shift ( ) ) ) ;
981
985
}
982
986
text = da . join ( ") Tj\nT* (" ) ;
983
987
} else {
You can’t perform that action at this time.
0 commit comments