Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Logo size in pdf invoice
 
pingvin
Jr. Member
 
Total Posts:  5
Joined:  2009-01-21
 

Hi,

Can anyone tell me how to change the size of logo in pdf invoice. Default size is 200x50 and I need to change that.

Thank you

 
Magento Community Magento Community
Magento Community
Magento Community
 
MageParts
Guru
 
Avatar
Total Posts:  415
Joined:  2007-11-18
 

Check app/code/core/Mage/Sales/Model/Order/Pdf/Abstract.php, line 115 (function insertLogo). I’m not sure if it will help, but it’s worth a shot smile

 
Magento Community Magento Community
Magento Community
Magento Community
 
NeilA
Moderator
 
Avatar
Total Posts:  1372
Joined:  2007-09-17
Blue Mountains, Oz
 

See also these resources - it’s trickier than you first think!

How to edit a PDF invoice
http://www.magentocommerce.com/wiki/how-to/editing_an_invoice_pdf

Thread about editing invoices, etc
http://www.magentocommerce.com/boards/viewthread/21141/

 
Magento Community Magento Community
Magento Community
Magento Community
 
pingvin
Jr. Member
 
Total Posts:  5
Joined:  2009-01-21
 

Thanks to everybody. I managed to make something.

 
Magento Community Magento Community
Magento Community
Magento Community
 
ngashokkumar
Jr. Member
 
Total Posts:  1
Joined:  2012-05-07
 

I’ve Tried Everything to change the Logo size in the Invoice pdf in magento.. but i’m unable to change that… Can anyone help me…

 
Magento Community Magento Community
Magento Community
Magento Community
 
kaylamatthews
Jr. Member
 
Total Posts:  8
Joined:  2012-02-02
 
ngashokkumar - 07 May 2012 10:14 PM

I’ve Tried Everything to change the Logo size in the Invoice pdf in magento.. but i’m unable to change that… Can anyone help me…

If you look up documentations on Zend framework you’ll see that for drawImage() those 4 numbers inside the parenthesis stand for x1, y1, x2, y2, meaning the distance between the first and last horizontal points, and the distance between the first and last vertical points.

For example if your logo is 400 by 100, then it’ll be something like

$page->drawImage($image, 25, 800, 425, 900);

Hope that helped

 
Magento Community Magento Community
Magento Community
Magento Community
 
moomoo
Sr. Member
 
Avatar
Total Posts:  192
Joined:  2009-07-10
 

I have to say that editing the logo images in magento PDFs is a pain in the @#&^…
You have to think in terms of the printing resolution when uploading and resizing images, and then of course all measurements and positions are in points in the PDFs.
I don’t mean to brag (!) but our newly updated PDF editing extension allows full-width header and footer images in the PDFs smile - drop me a line for the latest version.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Magazento
Sr. Member
 
Avatar
Total Posts:  155
Joined:  2010-01-08
Russia,Volgograd
 

Take a look on our PDF INVOICE \\ SHIPMENT \\ CREDIT MEMO extension.

\"Design stylish PDF documents for Invoices, Shipments, Credit memos with built in Magento wysiwyg, no coding! Extension replaces the built-in Magento PDF document generation tool with fully customizable pdf templates that you edit with wysiwyg. Now you can design your pdf template in directly your browser without any coding. Then click save click \"save template\” and you\’re done!\”

Demo:
PDF creditmemo sample: http://www.magazento.com/promo/pdfinvoice/creditmemo2012-09-04_02-20-12.pdf
PDF invoice sample: http://www.magazento.com/promo/pdfinvoice/invoice2012-09-04_02-15-46.pdf
PDF shipment sample: http://www.magazento.com/promo/pdfinvoice/packingslip2012-09-04_02-13-40.pdf

Extension page : http://www.magazento.com/english/magento-ext/magazento-extensions/pdf-invoice-shipment-credit-memo

 
Magento Community Magento Community
Magento Community
Magento Community
 
CuppaCoffee
Jr. Member
 
Total Posts:  2
Joined:  2012-03-27
 

Hi,

In the admin panel under System/Configuration/Sales, Sales Tab - Invoice and Packing Slip Design, it does say that size needs to be 200x50 however if you read below it says: \"If you see image distortion in PDF, try to use larger image\” and since my logo 200x50 was unclear I uploaded a 324x97 logo and it is now much clearer and is showing up bigger.  Don\’t know if this is the right way to do it, but it worked for me.

 
Magento Community Magento Community
Magento Community
Magento Community
 
stanb17
Member
 
Total Posts:  34
Joined:  2010-06-02
 

Just piping in to let you know that CuppaCoffee’s simple solution worked fine for me. I did not push it to the limits, but the image is definitely less pixelated than when you load a 200 by 50 pixel image. Would be nice if Magento added just a wee bit more layout control in the
SYSTEM - CONFIGURATION - SALES - SALES - INVOICE AND PACKING SLIP DESIGN tab.

Even just a right/left would be better than the obligatory left.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top