forked from science-ation/science-ation
only put the fair logo on the pdf if the logo file is valid
This commit is contained in:
parent
5dcf403421
commit
dfa1d438e7
11
lpdf.php
11
lpdf.php
@ -29,8 +29,12 @@ class lpdf
|
||||
pdf_show_boxed($this->pdf,$this->page_subheader,$this->loc(0.75),$this->loc($this->yloc),$this->loc(7),$this->loc($height['subtitle']),"center",null);
|
||||
$this->yloc-=$height['subtitle'];
|
||||
|
||||
//now place the logo image in the top-left-ish
|
||||
pdf_place_image($this->pdf,$this->logoimage,$this->loc(0.75),$this->loc($this->yloc+.02),.20);
|
||||
//only put the logo on the page if we actually have the logo
|
||||
if($this->logoimage)
|
||||
{
|
||||
//now place the logo image in the top-left-ish
|
||||
pdf_place_image($this->pdf,$this->logoimage,$this->loc(0.75),$this->loc($this->yloc+.02),.20);
|
||||
}
|
||||
|
||||
//header line
|
||||
pdf_moveto($this->pdf,$this->loc(0.5),$this->loc($this->yloc));
|
||||
@ -324,7 +328,8 @@ class lpdf
|
||||
$this->normalfont=pdf_findfont($this->pdf,"Times-Roman","host",0);
|
||||
$this->headerfont=pdf_findfont($this->pdf,"Times-Bold","host",0);
|
||||
|
||||
$this->logoimage=pdf_open_image_file($this->pdf,"gif",$logo,"",0);
|
||||
if(file_exists($logo))
|
||||
$this->logoimage=pdf_open_image_file($this->pdf,"gif",$logo,"",0);
|
||||
|
||||
pdf_set_info($this->pdf,"Author","SFIAB");
|
||||
pdf_set_info($this->pdf,"Creator","SFIAB");
|
||||
|
Loading…
Reference in New Issue
Block a user