NEW The signature is on the good page even if another module add pages

This commit is contained in:
ldestailleur
2025-03-20 12:01:18 +01:00
parent c3f46bd2e0
commit bb3989c9a7
5 changed files with 57 additions and 5 deletions

View File

@@ -757,6 +757,10 @@ class pdf_azur extends ModelePDFPropales
// Customer signature area
if (!getDolGlobalString('PROPAL_DISABLE_SIGNATURE')) {
$posy = $this->_signature_area($pdf, $object, $posy, $outputlangs);
// Rewrite keywords to add a tag with the numero of page that contains the signature section
$keywords = $outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("PdfCommercialProposalTitle")." ".$outputlangs->convToOutputCharset($object->thirdparty->name);
$pdf->SetKeyWords($keywords." PAGESIGN=".$pdf->getPage());
}
// Pied de page

View File

@@ -879,6 +879,10 @@ class pdf_cyan extends ModelePDFPropales
// Customer signature area
if (!getDolGlobalString('PROPAL_DISABLE_SIGNATURE')) {
$posy = $this->drawSignatureArea($pdf, $object, $posy, $outputlangs);
// Rewrite keywords to add a tag with the numero of page that contains the signature section
$keywords = $outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("PdfCommercialProposalTitle")." ".$outputlangs->convToOutputCharset($object->thirdparty->name);
$pdf->SetKeyWords($keywords." PAGESIGN=".$pdf->getPage());
}
// Add number of pages in footer