Jump to content

[SOLVED] Invoice logo


Recommended Posts

  • 4 weeks later...
  • 4 months later...

In PrestaShop v1.4, change lines 152-155 of classes/PDF.php:

if (file_exists(_PS_IMG_DIR_.'/logo_invoice.jpg'))
   $this->Image(_PS_IMG_DIR_.'/logo_invoice.jpg', 10, 8, 0, 15);
else if (file_exists(_PS_IMG_DIR_.'/logo.jpg'))
   $this->Image(_PS_IMG_DIR_.'/logo.jpg', 10, 8, 0, 15);



Change 15 to the height you want the logo to be. Since the width is 0, it will be automatically calculated based on the dimensions of the image.

  • Like 1
Link to comment
Share on other sites

  • 1 month later...
if (file_exists(_PS_IMG_DIR_.'/logo_invoice.jpg'))
   $this->Image(_PS_IMG_DIR_.'/logo_invoice.jpg', 10, 8, width, height);



Could you please be so kind and explain, what are the first two parameters for?

And one more question. I have a picture size 250×68px and if i put that size in the width and height parameters, i get a very large picture. Why is the actual size not working properly?

Now i have like this:
$this->Image(_PS_IMG_DIR_.'/logo_invoice.jpg', 10, 8, 0, 16);



and the logo looks just fine, except that i don't understand, why the height must be set to 16 and not to 68, which is the actual height of my logo image?

Thanks, Housy

Link to comment
Share on other sites

×
×
  • Create New...