UPDATE
We worked this out, kinda complicated to explain…
The PDF system seems to be hard coded to 70DPI, however the measurements are in mm (just to complicate it abit).
We wanted our logo to be 4.8 inches wide in the center, so without this turning in to a rocket science equation, we needed to do this with calculations in the PDF template.
For 4.8inch wide logo the pixel width needs to be 336 pixels, this is WAY to small to look any good on paper, so we saved the logo as 2016 pixels wide (6 times better resolution (70DPI * 6 = 420DPI).
To get a 2016 pixel wide image to show up correctly need to use the below maths (remember the units are mm and not inches).
2016 / 70 / 6 * 25.4
[image width] / [70DPI] / [incensed resolution] = REAL INCHES (so need to * 25.4 to get mm (as 25.4mm to 1 inch).
You might wonder how we managed to get access to the image size in the PDF, as the PDF template does not store the image log width anywhere, so we used the below PHP
list($pwidth, $pheight) = getimagesize($logo);
$logo = has the path to the image (as we stored it in the company logo section)
$pwidth = width in pixels of the real logo
$pheight = height in pixels of the real logo (this is never used, but handy to have)
$pdflogowidth = $pwidth / 70 / 6 * 25.4;
$pdflogowidth = the width in mm the logo will be on the page (as ours is 4.8inches, mm will be *25.4 (121.92mm)
Once you have that width, then you can start using the Image command in the PDF template, we used the below to get it centered.
$pdf->Image($logo, ($this->page_largeur - $pdflogowidth) / 2, 10, $pdflogowidth, 0);
$logo = the real path of the logo
$this->page_largeur = holds the total page width
The above says, page width - logo width = total space each side of the logo, then divide by 2 to work out how far in to push the logo then put it on the page (aka centered).
Your notice the use of @pdflogowidth in the image command, this is the part that SHRINKS the overside image down to the correct width we need to see of 121.92mm