I am trying to convert a PDF to a PNG using ghostscript and Imagick.
I have tried this:
o_imagick = new imagick(mydocu.pdf[0]);
$this->o_imagick->setImageFormat('png');
file_put_contents ("actualpdf.png", $this->o_imagick);
Which generates and saves a new image but the resolution is weird. I need it to be the same resolution as the PDF. I assumed it would just generate an exact PNG copy out of the PDF.
Any ideas?