Pdf to image using php-imagick api

前端 未结 1 1661
轮回少年
轮回少年 2021-01-14 16:00

i want to convert the PDF to image.But when the out put image generate it\'s get blur from original.Here is code

$uploadfile = \".pdf[53]\";
$img = new Imagi         


        
1条回答
  •  攒了一身酷
    2021-01-14 16:47

    Remove the resample and the resize calls and see what you get. It looks like you are shrinking it and then upsizing it.

    edit: setResolution(300,300) is too late -- the image has already been rendered. Do it like this:

    $im = new Imagick(); 
    $im->setResolution( 300, 300 ); 
    $im->readImage( $uploadfile );
    

    0 讨论(0)
提交回复
热议问题