diff --git a/classes/pdf/HTMLTemplateSupplyOrderForm.php b/classes/pdf/HTMLTemplateSupplyOrderForm.php
index fb53a38b1..515f541ef 100644
--- a/classes/pdf/HTMLTemplateSupplyOrderForm.php
+++ b/classes/pdf/HTMLTemplateSupplyOrderForm.php
@@ -123,15 +123,22 @@ class HTMLTemplateSupplyOrderFormCore extends HTMLTemplate
public function getHeader()
{
$shop_name = Configuration::get('PS_SHOP_NAME');
-
+ $path_logo = $this->getLogo();
+ $width = $height = 0;
+
+ if (!empty($path_logo))
+ list($width, $height) = getimagesize($path_logo);
+
$this->smarty->assign(array(
- 'logo_path' => $this->getLogo(),
+ 'logo_path' => $path_logo,
'img_ps_dir' => 'http://'.Tools::getMediaServer(_PS_IMG_)._PS_IMG_,
'img_update_time' => Configuration::get('PS_IMG_UPDATE_TIME'),
'title' => $this->title,
'reference' => $this->supply_order->reference,
'date' => $this->date,
- 'shop_name' => $shop_name
+ 'shop_name' => $shop_name,
+ 'width_logo' => $width,
+ 'height_logo' => $height
));
return $this->smarty->fetch($this->getTemplate('supply-order-header'));