saveImage('/home/runcloud/webapps/clicktushop/ats-1.jpg'); $path = '/home/runcloud/webapps/clicktushop/ats.pdf'; $imagick = new Imagick('file.pdf[0]');$imagick->setImageFormat('jpg');file_put_contents($pathToImage, $Imagickick);