Logo off centre

Logo off centre

by Nicola Little -
Number of replies: 2

Hello, 

I've tried to add a logo to the certificates but in both letter and A4 formats the logo is always too far right and goes over the border. 


I know if the certificate is off centre it is to do with the x,y positions in the code- is this the same for images? Or is it something else entirely?

Any help would be brilliant. 

Thanks 

Nicola

Average of ratings: -
In reply to Nicola Little

Re: Logo off centre

by Alex Ferrer -

Hi Nicola,

The position of the images are defined in:

....

// Define variables
// Landscape
if ($ certificate-> orientation == 'L') {

     $ x = 10;
     $ y = 30;
     $ sealx = 230;

     $ sealy = 150;
....


The text position is defined by the letters C (center), L (left) or R (right):

certificate_print_text($pdf, $x, $y, 'C', 'Helvetica', '', 30, get_string('title', 'certificate'));

As you say, adding values to the x and the text scrolls on these axes.
I hope you find it useful.

Regards.
In reply to Alex Ferrer

Re: Logo off centre

by Nicola Little -

Hi Alex, 

Thank you very much for your reply. I will try this out now and see if I can get it in the right position! Thanks again

Nicola