<?php phpinfo(); exit; $pdf = './manual.pdf'; $fp_pdf = fopen($pdf, 'rb'); $img = new imagick(); // [0] can be used to set page number $img->setResolution(300, 300); $img->readImageFile($fp_pdf); $img->setImageFormat("jpg"); $img->setImageCompression(imagick::COMPRESSION_JPEG); $img->setImageCompressionQuality(90); $img->setImageUnits(imagick::RESOLUTION_PIXELSPERINCH); $data = $img->getImageBlob();