Merge pull request #20943 from inovea-conseil/FIX_20621

FIX #20621 signature online with proposal with n page.
This commit is contained in:
Laurent Destailleur 2022-05-21 15:34:48 +02:00 committed by GitHub
commit 5ede88ef3c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -129,8 +129,12 @@ if ($action == "importSignature") {
$pdf->AddPage();
$pagecount = $pdf->setSourceFile($upload_dir.$ref.".pdf"); // original PDF
$tppl = $pdf->importPage(1);
$pdf->useTemplate($tppl);
for ($i=1;$i<($pagecount+1);$i++) {
if ($i>1) $pdf->AddPage();
$tppl=$pdf->importPage($i);
$pdf->useTemplate($tppl);
}
$pdf->Image($upload_dir.$filename, 129, 239.6, 60, 15); // FIXME Position will be wrong with non A4 format. Use a value from width and height of page minus relative offset.
$pdf->Close();
$pdf->Output($newpdffilename, "F");