Convert PDF to PNG without quality in PHP
Posted: 2012-05-11T07:15:51-07:00
Hello people,
I need a help.
I'm using CentOS 6.4 with ImageMagick 6.5.4-7 Q16 and image module 2.2.2 with php 5.3.3 with Ghostscript 8.70-11.e16_2.6.
What is happening is the following. I want to convert a page of the PDF to PNG, only to be coming with bad quality! How can I fix this problem to come with perfect quality?
The code is:
<?
$im = new Imagick ();
$im->readImage ( 'file.pdf[0]' );
$im->setImageFormat('png');
header("Content-type: image/png");
echo $im;
?>
I need a help.
I'm using CentOS 6.4 with ImageMagick 6.5.4-7 Q16 and image module 2.2.2 with php 5.3.3 with Ghostscript 8.70-11.e16_2.6.
What is happening is the following. I want to convert a page of the PDF to PNG, only to be coming with bad quality! How can I fix this problem to come with perfect quality?
The code is:
<?
$im = new Imagick ();
$im->readImage ( 'file.pdf[0]' );
$im->setImageFormat('png');
header("Content-type: image/png");
echo $im;
?>