When reading a PDF from an ImageBlob, and you want to set the page to be used, this is the function to use.
(PECL imagick 2, PECL imagick 3)
Imagick::setImageIndex — Establece la posición del iterador
Esta función está DEPRECADA a partir de Imagick 3.4.4. Depender de esta funcionalidad está fuertemente desaconsejado.
Establece la posición del iterador en la lista de imágenes especificada con el parámetro index.
Este método ha quedado obsoleto. Véase Imagick::setIteratorIndex().
index
La posición donde se va a establecer el iterador
Devuelve true
en caso de éxito.
Lanza una excepción ImagickException si ocurre un error.
When reading a PDF from an ImageBlob, and you want to set the page to be used, this is the function to use.
when you read pdf by getImageBlog and want to get the image or blob of a specific page, use this function as below.
$ims = new Imagick();
$ims->readImageBlob($pdfFileContent);
$ims->setImageIndex(5); //this will return 6th page of the pdf file
$image->setImageFormat('png');
//etc
$blob = $image->getImageBlob();