Kristaps Posted April 17, 2010 Share Posted April 17, 2010 I wanted to change logo for PDF invoice. I did it, but there's problem about the size. My logo size is bigger than it is supposed to be for invoice. What can I do? How can I allow my logo to be bigger? Any suggestions?Thanx! Link to comment Share on other sites More sharing options...
rocky Posted April 18, 2010 Share Posted April 18, 2010 You need to change line 139 of classes/PDF.php: $this->Image(_PS_IMG_DIR_.'/logo.jpg', 10, 8, 0, 15); The parameters after the image URL after for position x and y, then the image width and height. By default, the logo is placed 10 units from the left of the page and 8 units from the top of the page. It also has the height of the image set to 15 units and the width to 0, which means that the width is automatically calculated based on the height of the image. You can increase or decrease the 15 to adjust the size of the image. Link to comment Share on other sites More sharing options...
jaimeweb Posted May 17, 2011 Share Posted May 17, 2011 When i do this in 1.4 i get:FPDF error: Some data has already been output, can't send PDF file Link to comment Share on other sites More sharing options...
rocky Posted May 17, 2011 Share Posted May 17, 2011 In PrestaShop v1.4, you don't need to change that line. You can just go to the Modules > Themes tab and upload a different logo for the "Invoice logo". Link to comment Share on other sites More sharing options...
jaimeweb Posted May 19, 2011 Share Posted May 19, 2011 Yes but no matter how big you make the image, it still appears small on the invoice. Link to comment Share on other sites More sharing options...
rocky Posted May 19, 2011 Share Posted May 19, 2011 Then you'll have to change the code specified above. Changing the 15 on that logo.jpg line should change the height of the image. I don't understand why it's causing that error message for you. Link to comment Share on other sites More sharing options...
jaimeweb Posted May 19, 2011 Share Posted May 19, 2011 It just seems everytime i change 15 to something else eg: 30 i get that error, then if i change it back i still continue to get the error. Until i re-upload that original file again :S. Link to comment Share on other sites More sharing options...
rocky Posted May 19, 2011 Share Posted May 19, 2011 You might be saving the file with the wrong encoding. What are you using to edit the file? Link to comment Share on other sites More sharing options...
jaimeweb Posted May 20, 2011 Share Posted May 20, 2011 Erm just right clicking the file in Filezilla and click edit, opens in Notepad. Change 15 to 35 and save. Link to comment Share on other sites More sharing options...
rocky Posted May 20, 2011 Share Posted May 20, 2011 I just tried changing 15 to 35 on my website using Dreamweaver CS5 and it worked fine. I'm not getting any error messages. Maybe you can try Wordpad instead of Notepad? There's nothing more I can do to help. Link to comment Share on other sites More sharing options...
jaimeweb Posted May 20, 2011 Share Posted May 20, 2011 Ah, thats worked! Lol!Now i have another slight problem. If i increase it to 35 for instance...i need to make the Delivery and Invoice address blocks down as it overlaps with the larger logo. So in effect i need to push the whole page down.Thanks Link to comment Share on other sites More sharing options...
rocky Posted May 21, 2011 Share Posted May 21, 2011 You'll need to adjust the height of a cell to move everything down. Maybe increasing all the 10s in the if statements below the logo line will work. I suggest reading the tutorial and manual on the FPDF website for how to edit the PDF format. Link to comment Share on other sites More sharing options...
João Cason Posted August 23, 2013 Share Posted August 23, 2013 Just change the 61 and 62 lines of classes/pdf/HTMLTemplate.php like you want. works in 1.5.4.1 version Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now