Trying to open pdf file with php script with error:
Uncaught ImagickException: Failed to read the file in ...
I am running OS X, Brew, PHP 7.0, php70-imagick --HEAD, ImageMagick --with-ghostscript, GhostScript
The command line test works fine:
convert 1.pdf 1.jpg
File permission allowed. Try both the URL and the local file with the realpath function, so the path to the file is also fine. The script works fine if jpeg is open.
phpinfo() -> ImageMagick supported formats: EPDF, PDF, PDFA, etc.
UPDATE: Resolved. The solution is below.
source share