Failed to open file
Posted: 2018-10-01T03:47:05-07:00
Hi! I don't know if I write to right thread.
I have installed ImagickMagick 6 on Debian Jessie (and also Wheezy) through apt-get. Using imagick function I was able to create jpg version of pdfs till last month. Today I stamble upon a problem with this. Every time I try to use it to create jpg from pdf I error "Failed to open file" pop-up, even when I'm using old pdfs that worked before. Pdfs are opening normally (outside scripts that using imagick) without any problem. With jpegs there are no problems, imagick->readImage($dest) read file without any issues.
There was no updates made in last few weeks so no new code could affect it. Especially that last week it worked fine.
Here is a fragment of the code I use:
Is the file path an issue suddenly (e.g. /var/www/userfiles/1/ads/2018-09/GRAFFI-STUDIO-7640.pdf)? or maybe there was some date inside imagick or ghostscript that make it expired?
I have installed ImagickMagick 6 on Debian Jessie (and also Wheezy) through apt-get. Using imagick function I was able to create jpg version of pdfs till last month. Today I stamble upon a problem with this. Every time I try to use it to create jpg from pdf I error "Failed to open file" pop-up, even when I'm using old pdfs that worked before. Pdfs are opening normally (outside scripts that using imagick) without any problem. With jpegs there are no problems, imagick->readImage($dest) read file without any issues.
There was no updates made in last few weeks so no new code could affect it. Especially that last week it worked fine.
Here is a fragment of the code I use:
Code: Select all
$image = new imagick();
$image->setResolution(300, 300);
$image->readImage($dest);
$image->setImageFormat('jpg');
$image->writeImage($preview);
$image->clear();
$image->destroy();