drumslist Posted October 15, 2010 Share Posted October 15, 2010 Does anyone know how to change the Invoice logo from the default PS logo to a custom one?Thanks very much for your help,Andy, Nashville Link to comment Share on other sites More sharing options...
rocky Posted October 15, 2010 Share Posted October 15, 2010 PrestaShop v1.4 lets you upload a different invoice logo on the Preferences > Appearance tab. Until it is released, you will need to modify code. See here. Link to comment Share on other sites More sharing options...
drumslist Posted October 15, 2010 Author Share Posted October 15, 2010 Beautiful, thanks Rocky Link to comment Share on other sites More sharing options...
rocky Posted October 15, 2010 Share Posted October 15, 2010 Please edit your first post and add [sOLVED] to the front of the title. Link to comment Share on other sites More sharing options...
deech123 Posted November 9, 2010 Share Posted November 9, 2010 is there any way to know what the exact image height and length can be for the invoice?thx Link to comment Share on other sites More sharing options...
salko Posted March 27, 2011 Share Posted March 27, 2011 Does anybody know which line needs to be edited in PDF.php to change the invoice logo size (width x height)?? Thank you! Link to comment Share on other sites More sharing options...
rocky Posted March 27, 2011 Share Posted March 27, 2011 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. 1 Link to comment Share on other sites More sharing options...
salko Posted March 28, 2011 Share Posted March 28, 2011 Ok thanks, logo is now resized, but now the logo is overlapping the delivery address. How to move all the text to be a little lower? Link to comment Share on other sites More sharing options...
Housy Posted May 26, 2011 Share Posted May 26, 2011 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 More sharing options...
rocky Posted May 27, 2011 Share Posted May 27, 2011 That's because all the measurements are in millimetres, not pixels. The first two parameters are the x and y coordinates of the top-left corner of the image. You can read more on the FPDF website. 1 Link to comment Share on other sites More sharing options...
Housy Posted May 27, 2011 Share Posted May 27, 2011 Thanks a lot Rocky That's because all the measurements are in millimetres, not pixels. The first two parameters are the x and y coordinates of the top-left corner of the image. You can read more on the FPDF website. Link to comment Share on other sites More sharing options...
Recommended Posts