Jump to content

Customise Status size and add custom info to PDF invoice


fepixie

Recommended Posts

I had trouble figuring this out for a bit - theres not much helpful help here i could find - so here's a hack for anyone who needs it...

 

this is from the "portal" template set version Version: 4.3.1 (will update if it changes for .2 after i get round to downloading it) - no idea if the other templates are the same - havent looked....

 

the idea is to shrink and move up the status message - and add custom text below it...

 

edit [WHMCS Directory]/templates/portal/invoicepdf.tpl

or the corresponding file in your custom template directory

 

moving up the status message a bit...

FIND (line 107)

$pdf->SetXY(70,90);

CHANGE TO

$pdf->SetXY(80,85);

 

shrinking the status message...

FIND (line 124)

$pdf->SetFont('helvetica','B',40);

CHANGE TO

$pdf->SetFont('helvetica','B',16);

or any size you like

 

adding the custom info...

FIND (next line)

$pdf->Cell(120,20,strtoupper($statustext),0,0,'C');

AFTER ADD

# --------------------  CUSTOM DETAILS;
$pdf->SetXY(80,100);
$pdf->SetTextColor(0,0,0);
$pdf->SetFont('helvetica','',;

$txt = "Custom info: goes here";
$txt .= "\nAccounts Email: accounts@yoursite.co.nz";
$txt .= "\nWebsite: www.3rings.co.nz";
$pdf->MultiCell(120, 5, $txt."\n", 0, 'C', 0, 0, '' ,'', true);

 

and edit the $txt lines to say whatever you like - the \n goes where you want a line break

 

save and upload

 

Hopefully that will save someone else half a day figuring it out :shock:

Edited by fepixie
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