Attention une mise à jour du serveur va être effectuée le lundi 17 mai entre 13h et 13h30. Cette mise à jour va générer une interruption du service de quelques minutes.

Commit 48c620a7 authored by Mathieu Giraud's avatar Mathieu Giraud

lib/jspdf.js: align all texts on the middle of their y-coordinate.

Patch pdf.js for the (soon deprecated) main pdf output.
parent 240efb42
......@@ -1034,6 +1034,8 @@ var jsPDF = (function(global) {
if (!('autoencode' in flags))
flags.autoencode = true;
y += activeFontSize / 5 / 2;
if (typeof text === 'string') {
text = ESC(text);
} else if (text instanceof Array) {
......
......@@ -314,7 +314,7 @@ PDF.prototype = {
},
row: function (name, data, format) {
this.doc.text(this.marge, this.y, name);
this.doc.text(this.marge, this.y - 1, name);
var light = true;
......@@ -332,7 +332,7 @@ PDF.prototype = {
if (format == "%") r = (r * 100)
.toFixed(2) + ' %'
this.doc.text(x, y, ' ' + r);
this.doc.text(x, y - 1, ' ' + r);
}
return this;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment