簡體   English   中英

如何關閉PHP Imagick的readimage警告

[英]How to turn off PHP Imagick's readimage warnings

我正在使用PHP包Imagick。 當我調用方法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.

這是我正在使用的完整代碼:

$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();

有任何想法如何關閉此警告?

嘗試在php頁面的開頭添加它,

error_reporting(0);

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM