Skip to content

Commit 7da6aac

Browse files
committed
Adding letter-spacing method - closes #143
1 parent b6f019c commit 7da6aac

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

jspdf.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1014,6 +1014,10 @@ var jsPDF = (function(global) {
10141014
return this;
10151015
};
10161016

1017+
API.lstext = function(text, x, y, spacing) {
1018+
for (var i = 0, len = text.length ; i < len; i++, x += spacing) this.text(text[i], x, y);
1019+
};
1020+
10171021
API.line = function(x1, y1, x2, y2) {
10181022
return this.lines([[x2 - x1, y2 - y1]], x1, y1);
10191023
};

jspdf.plugin.addimage.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@
190190
var ctx = canvas.getContext('2d');
191191
if (!ctx) {
192192
throw ('addImage requires canvas to be supported by browser.');
193-
}document.body.appendChild(canvas);
193+
}
194194
if (angle) {
195195
var x, y, b, c, s, w, h, to_radians = Math.PI/180, angleInRadians;
196196

0 commit comments

Comments
 (0)