Use the resize
parameter of the image
function to scale the image . See the documentation.
Something like:
// set the required parameters
$posX = 100; // position x of the upper left corner
$posY = 100; // position y of the upper left corner
$newWidth = 400; // new width that you wish to scale to
$newHeight = 300; // new height that you wish to scale to
$type = ''; // will be kept default
$link = ''; // will be kept default
$align = ''; // will be kept default
$resize = true; // this will make the image resize
// add the scaled image
$pdf->image($name, $posX, $posY, $newWidth, $newHeight, $type, $link, $align, $resize);