Posted: October 23, 2018 at 4:19 pm
Can you please help us change the following two things in the system generated invoice pdf.
1. We would like the logo (at top left corner) to appear a little bit smaller that what is displayed now? We have tried changing the size of the logo itself but then it shows up as pixelated, which is a problem. Rather, we prefer a way, where we could specify the size (i.e. width) of the logo and if possible, the position of the logo also, from the top margin. Do we need to change anything in the template.php file? Can you specify which lines we should edit?
2. Secondly, we would prefer the address (at top left corner, below ‘2019 Modular and Offsite Construction’ text) to not appear as wrapped in a random fashion. How can we make sure that the address is displayed as follows in the pdf file.
University of Alberta
With EE3 you’ll need to edit the functions/template used to generate the PDF.
You’ll need to copy the ‘invoice’ directory from
In that location edit the functions.pdf.php file.
On line 16, you’ll have
Either, remove the
Or set it to a lower value, it sets the width of the image or if its remove automatically calculates the width based on the image.
EE3 uses FPDF to generate the PDFs and to use that you must build out cells, w set the width of those cells to help with printing the invoices but whats happening on yours is the text is wider than the cell so wraps.
You’ll need to adjust the with use to suit.
Around line 128 you’ll have
Change 50 to a higher value, 100 seems to work for your address but you may need to adjust.
Note that generally, we will not provide instructions on specific edits such as these, I had the file open so had a quick look but we don’t provide support for customizations, although we are usually more than happy to point you in the right direction.
May I ask, is there something preventing you from using EE4? The invoice template is customizable through the admin in EE4 and EE3 is no longer receiving feature updates so eventually you’ll likely need to update.
Thanks Tony for your help. It works perfectly.
We are using Moneris payment gateway. As I understand, this option is not available under EE4. Am I right?
If yes, do you plan to have this option in EE4 sometime in future?
Moneris is available for EE4 via the PayPal Payflow Pro gateway. More info here:
The support post ‘How to modify invoice pdf’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.