dousui4577 2019-06-25 15:58
浏览 124

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.

  • 写回答

0条回答

    报告相同问题?

    悬赏问题

    • ¥15 如何在scanpy上做差异基因和通路富集?
    • ¥20 关于#硬件工程#的问题,请各位专家解答!
    • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
    • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
    • ¥30 截图中的mathematics程序转换成matlab
    • ¥15 动力学代码报错,维度不匹配
    • ¥15 Power query添加列问题
    • ¥50 Kubernetes&Fission&Eleasticsearch
    • ¥15 報錯:Person is not mapped,如何解決?
    • ¥15 c++头文件不能识别CDialog