PDF到JPG - '致命错误'和'ImagickException'没有使用Imagick的错误代码

I'm using Imagick to convert a PDF to JPG, but when I'm trying to use the class, it throws me a fatal error and a ImagickException without any explaination.

Fatal error: in C:\wamp64\www\wordpress\wp-content\plugins\formprocess-plugin\back-end\devis_validation.php on line 83

ImagickException: in C:\wamp64\www\wordpress\wp-content\plugins\formprocess-plugin\back-end\devis_validation.php on line 83

Here is the code I'm using :

$devis_path = $_SERVER['DOCUMENT_ROOT'].'/wordpress/devis_pdf/'.$_SESSION['email'].'/DEVIS_'.$_POST['id_devis'].'.pdf';
$devis_img = $_SERVER['DOCUMENT_ROOT'].'/wordpress/devis_pdf/'.$_SESSION['email'].'/';

$im = new Imagick($devis_path);
$im->setImageFormat('jpg');
file_put_contents($devis_img, $im);

$devis_path and $devis_img are set, so I really don't know where's the problem.

dongnue4923
dongnue4923 我也尝试在我的PDF上使用readImage,但错误是一样的
一年多之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问