Support

Home Forums Event Espresso Premium How to modify invoice pdf

How to modify invoice pdf

Posted: October 23, 2018 at 4:19 pm

Viewing 4 reply threads


modular

October 23, 2018 at 4:19 pm

Hello,

Can you please help us change the following two things in the system generated invoice pdf.

Here is the sample pdf invoice file

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
Hole School of Construction Engineering
Department of Civil & Environmental Engineering
7th floor, Donadeo Innovation Centre for Engineering
9211 116 Street NW, Edmonton, AB, Canada, T6G 1H9
Email: info@mocsummit.com

Regards,
Gurjeet


Tony

  • Support Staff

October 24, 2018 at 7:23 am

Hi Gurjeet,

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?

With EE3 you’ll need to edit the functions/template used to generate the PDF.

You’ll need to copy the ‘invoice’ directory from \event-espresso\gateways\ to \wp-content\uploads\espresso\gateways\

In that location edit the functions.pdf.php file.

On line 16, you’ll have

$this->Image($invoice_payment_settings['image_url'],10,8,90);//Set the logo if it is available

Either, remove the ,90, like so:

$this-$this->Image($invoice_payment_settings['image_url'],10,8);//Set the logo if it is available

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.

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.

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.
For that section you edit the template.php file that is now within \wp-content\uploads\espresso\gateways\invoice

Around line 128 you’ll have

$pdf->MultiCell(50, 5, pdftext($invoice_payment_settings['payment_address']), 0, 'L'); //Set address

Change 50 to a higher value, 100 seems to work for your address but you may need to adjust.

Can you specify which lines we should edit?

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.


modular

October 24, 2018 at 10:02 am

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?

Regards,
Gurjeet


Josh

  • Support Staff

October 24, 2018 at 10:07 am

Moneris is available for EE4 via the PayPal Payflow Pro gateway. More info here:

https://eventespresso.com/product/eea-payflow-pro-gateway/


modular

October 24, 2018 at 10:25 am

Thanks Josh.
We will rather stick with EE3 at this point, since our team would not agree to pay Paypal for their payflow pro service.
We will happily switch to EE4, once we have the option to directly connect to moneris from within event espresso.

Viewing 4 reply threads

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.

Event Espresso