forked from Wavyzz/dolibarr
Try to keep proportions of logo
This commit is contained in:
committed by
GitHub
parent
3f63be6045
commit
2bc821d900
@@ -179,7 +179,7 @@ class pdf_tcpdflabel extends CommonStickerGenerator
|
|||||||
$logoWidth = $widthtouse/2;
|
$logoWidth = $widthtouse/2;
|
||||||
if (($textleft == '%LOGO%' || $textleft == '%PHOTO%' || $textleft == '%BARCODE%') && !strstr($textright, '%') ) // left part logo/barcode right part text
|
if (($textleft == '%LOGO%' || $textleft == '%PHOTO%' || $textleft == '%BARCODE%') && !strstr($textright, '%') ) // left part logo/barcode right part text
|
||||||
{
|
{
|
||||||
if ($textleft == '%LOGO%' && $logo) $pdf->Image($logo, $_PosX+$xleft, $_PosY+$ytop, $logoWidth, $logoHeight);
|
if ($textleft == '%LOGO%' && $logo) $pdf->Image($logo, $_PosX+$xleft, $_PosY+$ytop, $logoWidth, 0);
|
||||||
elseif ($code && !empty($encoding))
|
elseif ($code && !empty($encoding))
|
||||||
{
|
{
|
||||||
$this->writeBarcode($pdf, $code, $encoding, $is2d, $_PosX+$xleft, $_PosY+$ytop, $widthtouse/2, $heighttouse);
|
$this->writeBarcode($pdf, $code, $encoding, $is2d, $_PosX+$xleft, $_PosY+$ytop, $widthtouse/2, $heighttouse);
|
||||||
@@ -189,7 +189,7 @@ class pdf_tcpdflabel extends CommonStickerGenerator
|
|||||||
}
|
}
|
||||||
elseif (($textright == '%LOGO%' || $textright == '%PHOTO%' || $textright == '%BARCODE%') && !strstr($textleft, '%')) // right part logo/barcode left part text
|
elseif (($textright == '%LOGO%' || $textright == '%PHOTO%' || $textright == '%BARCODE%') && !strstr($textleft, '%')) // right part logo/barcode left part text
|
||||||
{
|
{
|
||||||
if ($textright == '%LOGO%' && $logo) $pdf->Image($logo, $_PosX+($widthtouse/2), $_PosY+$ytop, $logoWidth, $logoHeight);
|
if ($textright == '%LOGO%' && $logo) $pdf->Image($logo, $_PosX+($widthtouse/2), $_PosY+$ytop, $logoWidth, 0);
|
||||||
elseif ($code && !empty($encoding))
|
elseif ($code && !empty($encoding))
|
||||||
{
|
{
|
||||||
$this->writeBarcode($pdf, $code, $encoding, $is2d, $_PosX+($widthtouse/2), $_PosY+$ytop, $widthtouse/2, $heighttouse);
|
$this->writeBarcode($pdf, $code, $encoding, $is2d, $_PosX+($widthtouse/2), $_PosY+$ytop, $widthtouse/2, $heighttouse);
|
||||||
|
|||||||
Reference in New Issue
Block a user