Imagick Failed to read the file PDF
<p>I'm using Imagick and trying to convert a pdf to a png. It fails. My error_log says "Failed to read the file".</p>

<p><a href="https://i.stack.imgur.com/yGv2N.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yGv2N.png" alt="Php info"></a></p>

<p>Example code:</p>

<pre><code>$fileone =  $_SERVER['DOCUMENT_ROOT'] . '/' . 'test.pdf';
$image = new Imagick($fileone);
$image-&gt;readImage($fileone);
$image-&gt;thumbnailImage(300, 0);
echo '&lt;img src="data:image/png;base64,' .  base64_encode($image-&gt;getimageblob())  . '" /&gt;';
</code></pre>

<p>Thoughts?</p>