Jump to content

Modify Your PDF Logo Size


JulesR

Recommended Posts

If i'm not mistake (from the changelog), the latest version of WHMCS has an updated version of the script used to generate the PDF's. When I get time to look, I'll see if anything has changed.

 

Hi,

 

Same issue in WHMCS V4.1.1 - logo gets expanded and isn't fully left justified.

 

Your input would be much appreciated.

Link to comment
Share on other sites

  • 1 month later...
  • 2 months later...

We actually need to know what the path is, because everybody seems to strip out <templatepath> - do we actyally change this in the Order form folder, default folder or portal folder?

 

I just cannot find that logo that appears on my invoice, Ive tried all folders - I use the tampletate

 

Portal in Admin

 

mydomain.co.za/whmcs/templates/portal/images/ << There is no jpg or jpeg in this folder - So I dont know where the invoice is getting this logo from at all

 

and the logo that appears in my invoice is just not in there, and this is the path in my invoicepdf.tpl

 

$pdf->Image(ROOTDIR.'/images/logo.jpg',20,25);

 

Can anybody help me please.

Link to comment
Share on other sites

  • 5 months later...
  • 2 months later...
I spent some time today trying to figure out how to replace the logo in the PDF invoices, and based on some of the posts in these forums and a little digging around, I managed to figure it out. Hopefully this will help anyone else looking for information:

 

The file you need to edit is: templates/<templatename>/invoicepdf.tpl

Replace "<templatename>" with the name of the template you're currently using.

 

Look for this section at the top:

 

# Logo
$pdf->Image(ROOTDIR.'/images/logo.jpg',20,25);

 

We can add some additional values to this line to specify the image width and height, but these values need to be specified in mm and not pixels as you may assume. If you need to determine the size in mm based on the current pixel dimensions of your image, you can use a calculator here:

 

http://www.unitconversion.org/typography/pixels-x-to-millimeters-conversion.html

 

Once you've obtained your dimensions, replace the PHP line above to something like this:

 

# Logo
$pdf->Image(ROOTDIR.'/images/logo.jpg',20,25,widthinmm, heightinmm);

Replace widthinmm and heightinmm to their respective numeric values.

 

Save the file, and hey presto, you should be good to go :)

 

I was looking for this, thank you!!!

Link to comment
Share on other sites

  • 1 month later...

Ok I got my image to work using the following. Only Modify the second number and the last number. The second number is the vertical placement, and the last number represented the proportion/zoom. Change those numbers until your image looks right. I am using the latest version of WHMCS as of today.

 

$pdf->Image(ROOTDIR.'/images/logo.jpg',20,20,0,25)

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