[英]How to turn off PHP Imagick's readimage warnings
I am using PHP package Imagick. 我正在使用PHP包Imagick。 When I call method readimage I get this annoying warnings for some PDF's: 当我调用方法readimage时,我会收到一些令人讨厌的警告:
**** This file had errors that were repaired or ignored.
**** The file was produced by:
**** >>>> <<<<
**** Please notify the author of the software that produced this
**** file that it does not conform to Adobe's published PDF
**** specification.
This is whole code that I am using: 这是我正在使用的完整代码:
$img = new Imagick();
$img->setResolution(100, 100);
$img->readimage("scan-qr.pdf[0]");
$img->setImageFormat('gif');
$img->writeImage("scan-qr-$quality.gif");
$img->clear();
$img->destroy();
Any ideas how to turn off this warnings? 有任何想法如何关闭此警告?
尝试在php页面的开头添加它,
error_reporting(0);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.