I'm having a hard time converting a pdf file to jpg using the php Imagick Library on a wordpress based web site.
I have done some reading and I think I need to install Ghostscript to achieve my goal. Is that the case or I can do it without Ghostscript.
My code looks like that:
$img = new Imagick();
$img->setResolution(200,350);
$img->readImageFile($link.'[0]');
$img->setImageFormat('jpeg');
$img->destroy();
$img->clear();
I can successfully run the above code without the setImageFormat. setImageFormat produces an error. All other commands run successfully though.
Any ideas??
Thanks