Jump to content

Logo on Invoice PDFs


Recommended Posts

It has come to my attention that if a client tries to download a PDF version of an invoice, instead of my logo, it contains a generic and unprofessional "upload your logo here" message.

 

I have taken care of this step many times over the years, but my logo always seems to get deleted and replaced with this message?

 

At any rate, can someone help me do this properly? I uploaded a logo to  /assets/img/ but when I view it on a downloaded PDF it is giant and pixelated. I just want something that looks neat and professional - I would rather avoid editing template files, etc., if possible. If someoen could just let me know the proper resolution and default dimensions that the file should be to display properly, that would be great. 

 

Thank you in advance.

Link to comment
Share on other sites

In your invoicepdf.tpl file there's this line:

$pdf->Image(ROOTDIR . '/assets/img/' . $logoFilename, 15, 25, 75);

Last number (75) is the width of your logo. Adjust that accordingly. Alternatively upload a logo that is about 300x60px and don't change anything in tpl. This should already give you a nice result.

Edited by Kian
Link to comment
Share on other sites

Thank you for your response. It still looks quite pixelated, but much better. Does it matter what the resolution is?

 

The thing I am confused by is the 75. If 75 is the width of the logo, why do you say to use an image that is 300x60? I had originally uploaded an image that was 75px wide, thinking that was the desired width - but that's obviously what was causing my problem.

 

I guess it doesn't really matter, it's just confusing. And it would be nice if WHMCS would specify the required dimensions in their documentation.

 

Do you have any idea if I can expect this logo to get overwritten whenever there is an WHMCS update? I SWEAR that has happened in the past, but perhaps I was doing something wrong.

 

Thank you again.

 

 

 

 

Link to comment
Share on other sites

On 03/06/2019 at 23:23, somecows said:

Thank you for your response. It still looks quite pixelated, but much better. Does it matter what the resolution is?

yes.

On 03/06/2019 at 23:23, somecows said:

The thing I am confused by is the 75. If 75 is the width of the logo, why do you say to use an image that is 300x60? I had originally uploaded an image that was 75px wide, thinking that was the desired width - but that's obviously what was causing my problem.

that setting isn't a width of 75px - you have to remember this is PDF, so it's more for printing than displaying on-screen... those units are mm by default, so you're telling WHMCS that the image should be 75mm wide.

On 03/06/2019 at 23:23, somecows said:

I guess it doesn't really matter, it's just confusing. And it would be nice if WHMCS would specify the required dimensions in their documentation.

dimensions really depend on the logos - and they can come in all shapes and sizes. 🙂

long ago, when I first installed WHMCS, one of the quickest ways I found was to load the placeholder.png into Photoshop (or similar), add the company logo as a new layer, remove the original background layer and save as logo.png - that way, there was no need to edit the template... these days, i'd just edit the template with the correct values for the logo size.

On 03/06/2019 at 23:23, somecows said:

Do you have any idea if I can expect this logo to get overwritten whenever there is an WHMCS update? I SWEAR that has happened in the past, but perhaps I was doing something wrong.

I don't think it should do - I can't recall ever updating WHMCS and finding that logo.png (or jpg) had been overwritten... now, if you've kept the logo filename you're using as 'placeholder.png', then I can see that that might get overwritten during an update.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated