diff --git a/admin/reports.inc.php b/admin/reports.inc.php index 49d2527..fa1668b 100644 --- a/admin/reports.inc.php +++ b/admin/reports.inc.php @@ -501,7 +501,7 @@ foreach($report_stock as $n=>$v) { $label_stock = $report_stock[$report['option']['stock']]; $rep=new lpdf( i18n($config['fairname']), i18n($report['name']), - $_SERVER['DOCUMENT_ROOT'].$config['SFIABDIRECTORY']."/data/logo-200.gif"); + $_SERVER['DOCUMENT_ROOT'].$config['SFIABDIRECTORY']."/data/logo.gif"); $rep->setPageStyle("labels"); $rep->newPage($label_stock['page_width'], $label_stock['page_height']); $rep->setFontSize(11); @@ -513,7 +513,7 @@ foreach($report_stock as $n=>$v) { /* FIXME: handle landscape pages in here */ $rep=new lpdf( i18n($config['fairname']), i18n($report['name']), - $_SERVER['DOCUMENT_ROOT'].$config['SFIABDIRECTORY']."/data/logo-200.gif"); + $_SERVER['DOCUMENT_ROOT'].$config['SFIABDIRECTORY']."/data/logo.gif"); $rep->newPage(); $rep->setFontSize(11); $gen_mode = 'table'; diff --git a/lpdf.php b/lpdf.php index 10c4581..bc4596d 100644 --- a/lpdf.php +++ b/lpdf.php @@ -83,8 +83,14 @@ class lpdf //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($this->page_margin),$this->loc($this->yloc+.02),.20); + /* now place the logo image in the top-left-ish + * within a box width=height=0.70, fit to the box, and + * center in the box */ + $w = $this->loc(0.70); + pdf_fit_image($this->pdf, $this->logoimage, + $this->loc($this->page_margin), + $this->loc($this->yloc+.02), + "boxsize { $w $w} position {50 50} fitmethod meet" ) ; } //header line @@ -451,10 +457,14 @@ class lpdf if($show_logo == true && $this->logoimage) { - //now place the logo image in the top-left-ish - pdf_place_image($this->pdf,$this->logoimage, + /* now place the logo image in the top-left-ish + * within a box width=height=0.70, fit to the box, and + * center in the box */ + $w = $this->loc(0.70); + pdf_fit_image($this->pdf, $this->logoimage, $this->loc($this->label_current_xpos+0.05), - $this->loc($this->label_current_ypos-0.75),0.2); + $this->loc($this->label_current_ypos-0.75), + "boxsize { $w $w} position {50 50} fitmethod meet" ) ; } $this->label_effective_height = $this->label_height;