[英]imagick function to read pdf files
$file_path = $this->filePath.'d/'.$this->compId.'/'.$data->project_id.'/'.$result[0]->file_name;
$im = new Imagick();
$im->pingImage($file_path);
I am not able to get the pdf file response using the above code. 我无法使用以上代码获得pdf文件响应。
Error:-
Fatal error : Uncaught exception 'ImagickException' with message 'Failed to read the file' in /srv/www/api.proofhub.com/public_html/application/core/v2/proof.php:114
错误:- 致命错误 :/srv/www/api.proofhub.com/public_html/application/core/v2/proof.php:114中
出现未捕获的异常“ ImagickException”,消息为“无法读取文件”
Stack trace: #0 /srv/www/api.proofhub.com/public_html/application/core/v2/proof.php(114): Imagick->pingimage('/srv/www/api.pr...')
堆栈跟踪:#0 /srv/www/api.proofhub.com/public_html/application/core/v2/proof.php(114):imagick-> pingimage('/ srv / www / api.pr ...')
Try checking the file path before continuing: 在继续之前,请尝试检查文件路径:
$file_path = $this->filePath.'d/'.$this->compId.'/'.$data->project_id.'/'.$result[0]->file_name;
if (! file_exists($file_path)) {
die('the file path '.$file_path.' does not appear to exist');
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.