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); }