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 — Set the iterator position
Această funcție este ÎNVECHITĂ începând cu Imagick 3.4.4. Utilizarea acesteia este foarte nerecomandată.
$index
) : boolSet the iterator to the position in the image list specified with the index parameter.
This method has been deprecated. See Imagick::setIteratorIndex().
index
The position to set the iterator to
Întoarce true
în caz de succes.
Emite ImagickException în caz de eroare.
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();