Forum

Ask, reply and learn. Join the community of Akaunting.

New Discussion

Company logo on Invoice is distorted

Arjun   ( User )

Commented 4 years ago

My company logo which is originally 285px x 134px is being distorted to approximately 188px x 134px. Only the width of the image is distorted and not the height. Any clue why this is happening and how I can resolve it?

Arjun   ( User )

Commented 4 years ago

I figured out that it is squishing it to fit a 128px square size. This is too small for my invoice. Any one knows which file to edit on the laravel installation to have it increased to 256x256?

Arjun   ( User )

Commented 4 years ago

Managed to find the file and make the necessary changes.

You will need to edit the following file: Logo.php
It is found in this directory: akaunting/app/Http/ViewComposers
The line which you need to edit is this:
$width = $height = setting('invoice.logo_size', 128);

I updated them to the following lines:
$width = setting('invoice.logo_size', 270); //Change 270px to whichever width you require
$height = setting ('invoice.logo_size', 127); //Change 127px to whichever height you require

Do note that obviously all your previous invoices/estimates will be impacted with the new logo dimensions. So when you try to download the PDF or view the invoice/estimate of an old invoice, you will see the new logo with the new dimensions.

Stan Derksen   ( User )

Commented 4 years ago

Thanks for sharing, Arjun. I was looking for this as well. Now I need to find out how to override this file the 'correct way' (e.g. by overriding it in a new module).

M Barnard Smit Law   ( User )

Commented 3 years ago

I am using the cloud version of the product hosted by Akaunting my logo looks "Squashed" does anybody know what size it should be so it does not appear Squashed? Also it would be great if i can make the logo larger. Thank you in advance

Sergio Martinez   ( User )

Commented 3 years ago

dont work this method, any know how delete cache ?

Veev   ( User )

Commented 2 years ago

Managed to find the file and make the necessary changes.

You will need to edit the following file: setting.php.
It is found in this directory:public_html/config/setting.php.
edit these lines
'logo_size_width'=>env('SETTING_FALLBACK_INVOICE_LOGO_SIZE_WIDTH', 128),

'logo_size_height' =>env('SETTING_FALLBACK_INVOICE_LOGO_SIZE_HEIGHT', 128),
Change 128 to whichever width and height you require.

Please login or register to leave a response.

Showing 1 to 7 of 7 discussions