From 44d4abd6a136c5a4ce6fa12f583eafdce35b6ec6 Mon Sep 17 00:00:00 2001 From: Anthony Berton <34568357+BB2A-Anthony@users.noreply.github.com> Date: Wed, 26 Jun 2024 17:06:08 +0200 Subject: [PATCH] FIX - Online Sign pos on last page (#30158) Co-authored-by: Anthony Berton --- htdocs/core/ajax/onlineSign.php | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/htdocs/core/ajax/onlineSign.php b/htdocs/core/ajax/onlineSign.php index e28df2fc758..08a9ad5c05e 100644 --- a/htdocs/core/ajax/onlineSign.php +++ b/htdocs/core/ajax/onlineSign.php @@ -215,9 +215,21 @@ if ($action == "importSignature") { // A signature image file is 720 x 180 (ratio 1/4) but we use only the size into PDF // TODO Get position of box from PDF template - $param['xforimgstart'] = (empty($s['w']) ? 120 : round($s['w'] / 2) + 15); - $param['yforimgstart'] = (empty($s['h']) ? 240 : $s['h'] - 60); - $param['wforimg'] = $s['w'] - 20 - $param['xforimgstart']; + if (getDolGlobalString("PROPAL_SIGNATURE_XFORIMGSTART")) { + $param['xforimgstart'] = getDolGlobalString("PROPAL_SIGNATURE_XFORIMGSTART"); + } else { + $param['xforimgstart'] = (empty($s['w']) ? 120 : round($s['w'] / 2) + 15); + } + if (getDolGlobalString("PROPAL_SIGNATURE_YFORIMGSTART")) { + $param['yforimgstart'] = getDolGlobalString("PROPAL_SIGNATURE_YFORIMGSTART"); + } else { + $param['yforimgstart'] = (empty($s['h']) ? 240 : $s['h'] - 60); + } + if (getDolGlobalString("PROPAL_SIGNATURE_WFORIMG")) { + $param['wforimg'] = getDolGlobalString("PROPAL_SIGNATURE_WFORIMG"); + } else { + $param['wforimg'] = $s['w'] - 20 - $param['xforimgstart']; + } dolPrintSignatureImage($pdf, $langs, $param); }