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 有赏,i卡绘世画不出
    • ¥15 如何用stata画出文献中常见的安慰剂检验图
    • ¥15 c语言链表结构体数据插入
    • ¥40 使用MATLAB解答线性代数问题
    • ¥15 COCOS的问题COCOS的问题
    • ¥15 FPGA-SRIO初始化失败
    • ¥15 MapReduce实现倒排索引失败
    • ¥15 ZABBIX6.0L连接数据库报错,如何解决?(操作系统-centos)
    • ¥15 找一位技术过硬的游戏pj程序员
    • ¥15 matlab生成电测深三层曲线模型代码