Try to keep proportion of logo

This commit is contained in:
Laurent Destailleur 2019-06-13 10:09:20 +02:00 committed by GitHub
parent 2bc821d900
commit ab9742f4df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -199,7 +199,7 @@ class pdf_tcpdflabel extends CommonStickerGenerator
}
elseif ($textleft == '%LOGO%') // left part logo right part text/barcode
{
if ($logo) $pdf->Image($logo, $_PosX+$xleft, $_PosY+$ytop, $logoWidth, $logoHeight);
if ($logo) $pdf->Image($logo, $_PosX+$xleft, $_PosY+$ytop, 0, $logoHeight);
if ($code && !empty($encoding))
{
$this->writeBarcode($pdf, $code, $encoding, $is2d, $_PosX+$xleft+$logoWidth+1, $_PosY+$ytop, $widthtouse-$logoWidth-1, $heighttouse);
@ -210,7 +210,7 @@ class pdf_tcpdflabel extends CommonStickerGenerator
}
elseif ($textright == '%LOGO%') // right part logo left part text/barcode
{
if ($logo) $pdf->Image($logo, $_PosX+$xleft+$widthtouse-$logoWidth+1, $_PosY+$ytop, $logoWidth, $logoHeight);
if ($logo) $pdf->Image($logo, $_PosX+$xleft+$widthtouse-$logoWidth+1, $_PosY+$ytop, 0, $logoHeight);
if ($code && !empty($encoding))
{
$this->writeBarcode($pdf, $code, $encoding, $is2d, $_PosX+$xleft, $_PosY+$ytop, $widthtouse-$logoWidth-1, $heighttouse);