$pdf->Image($realpath,$curX+(($this->posxtva-$this->posxpicture-$imglinesize['width'])/2),$curY,$imglinesize['width'],$imglinesize['height'],'','','',2,300);// Use 300 dpi
$pdf->Image($realpath,$curX+(($this->posxtva-$this->posxpicture-$imglinesize['width'])/2),$curY,$imglinesize['width'],$imglinesize['height'],'','','',2,300);// Use 300 dpi
// $pdf->Image does not increase value return by getY, so we save it manually