# HG changeset patch # User Fadi Abbud # Date 1562850893 -7200 # Node ID 2c9e96b02573c1c906d5e7e529658c35fbf064c2 # Parent 1e837d86beade30699086a9ebbd1546f11ee7fe8 clinet: pdf-gen: improve addTextBox() function for template diff -r 1e837d86bead -r 2c9e96b02573 client/src/lib/mixins.js --- a/client/src/lib/mixins.js Thu Jul 11 14:53:07 2019 +0200 +++ b/client/src/lib/mixins.js Thu Jul 11 15:14:53 2019 +0200 @@ -292,7 +292,10 @@ x = this.pdf.width - offset.x - width; } if (["bottomright", "bottomleft"].indexOf(position) !== -1) { - y = this.pdf.height - offset.y - this.getTextHeight(textLines.length); + y = + this.pdf.height - + offset.y * 0.3 - + this.getTextHeight(textLines.length); } this.pdf.doc.text(textLines, x, y, { baseline: "hanging" }); }, @@ -422,7 +425,7 @@ ); this.addText( position, - { x: offset.x + padding, y: offset.y + padding }, + { x: offset.x + padding, y: offset.y + padding * 2 }, textWidth, fontSize, color,