Verified Commit 23be726c authored by Damien's avatar Damien
Browse files

FEAT #16982 TIME 1:30 Yousign positions

parent e06b723f
......@@ -532,12 +532,12 @@ class DocumentController
if (empty($workflow['userId'])) {
if (!empty($workflow['signaturePositions'])) {
foreach ($workflow['signaturePositions'] as $signaturePosition) {
$pageWidth = $pdf->getPageWidth($signaturePosition['page'] - 1);
$pageHeight = $pdf->getPageHeight($signaturePosition['page'] - 1);
$pageId = $pdf->importPage($signaturePosition['page']);
$dimensions = $pdf->getTemplateSize($pageId);
$llx = $pageWidth * $signaturePosition['positionX'] / 100;
$llx = $dimensions['width'] * $signaturePosition['positionX'] / 100;
$llx = round($llx);
$lly = $pageHeight - ($pageHeight * $signaturePosition['positionY'] / 100) - 40;
$lly = $dimensions['height'] - ($dimensions['height'] * $signaturePosition['positionY'] / 100) - 40;
$lly = round($lly);
$urx = $llx + 100;
$urx = round($urx);
......
Supports Markdown
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