Imagick don't open pdf files with "Failed to read the file" exception
<p>Trying to open PDF file from php script drop into fault with error:</p>

<pre><code>Uncaught ImagickException: Failed to read the file in ...
</code></pre>

<p>I'm running OS X, Brew, PHP 7.0, php70-imagick --HEAD, ImageMagick --with-ghostscript, GhostScript</p>

<p>Command line test works fine:</p>

<pre><code>convert 1.pdf 1.jpg
</code></pre>

<p>File permission is ok. Try both, an URL and local file with realpath function, so filepath is ok too. Script works fine if open jpeg.</p>

<pre><code>phpinfo() -&gt; ImageMagick supported formats: EPDF, PDF, PDFA, etc.
</code></pre>

<p>UPDATE: Solved. Solution below.</p>