New: Can add a background

This commit is contained in:
Laurent Destailleur 2010-02-13 23:27:03 +00:00
parent e3a79d8703
commit 91b8ea3fa9

View File

@ -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!='')
{