diff --git a/htdocs/includes/modules/member/cards/pdf_standard.class.php b/htdocs/includes/modules/member/cards/pdf_standard.class.php index afcc3c52893..40d3ee35837 100644 --- a/htdocs/includes/modules/member/cards/pdf_standard.class.php +++ b/htdocs/includes/modules/member/cards/pdf_standard.class.php @@ -152,6 +152,13 @@ class pdf_standard { $photo=$dir.'/'.$file; if (! is_readable($photo)) $photo=''; + // Define background image + $backgroundimage=''; + if(! empty($conf->global->ADHERENT_CARD_BACKGROUND) && file_exists($conf->adherent->dir_output.'/'.$conf->global->ADHERENT_CARD_BACKGROUND)) + { + $backgroundimage=$conf->adherent->dir_output.'/'.$conf->global->ADHERENT_CARD_BACKGROUND; + } + // Print lines if ($this->code == "CARD") { @@ -160,6 +167,12 @@ class pdf_standard { $this->_Croix($pdf,$_PosX,$_PosY,$_PosX+$this->_Width,$_PosY+$this->_Height,0.1,10); } + // Background + if ($backgroundimage) + { + $pdf->image($backgroundimage,$_PosX,$_PosY,$this->_Width,$this->_Height); + } + // Top if ($header!='') {