title: Attempt to perform an operation not allowed by the security policy `PDF' @ error/constitute.c/IsCoderAuthorized/408
body: <p>I am running a laravel project in my local ubuntu 20.04 machine that was functioning fine in another machine. The project uses Image Magic to convert PDF to PNG. While I am evoking the function to convert PDF into PNG I get  the following error:</p>
  <blockquote>
  <p>ImagickException
  attempt to perform an operation not allowed by the security policy `PDF' @ error/constitute.c/IsCoderAuthorized/408</p>
  </blockquote>
  <p>THE function looks:</p>
  <pre><code>public function show($id)
      {
          $book = Book::all()-&gt;first();
          $file = public_path('' . $book-&gt;pdf);
          $count = 0;
          $im = new \Imagick($file);
          $blobList=[];
          do {
              $page = new \Imagick();
              $page-&gt;setResolution(300,300);
              $page-&gt;readImage($file . '['.$count.']');
              $page-&gt;setImageFormat(&quot;jpeg&quot;);
              header(&quot;Content-Type: image/jpeg&quot;);
              $image = $page-&gt;getImageBlob();
              array_push($blobList,$image);
              $count++;
          } while (5&gt; $count);
  //        $im-&gt;resizeImage(200,200,1,0);
          return view('notice/showbook', compact('book', 'blobList'));
      }
  </code></pre>
  <p>SO far I have installed image magic and gs and made changes in <code>policymap.xml</code> with reference to the accepted answer of <a href="https://stackoverflow.com/questions/52998331/imagemagick-security-policy-pdf-blocking-conversion">this question</a></p>
  <p>Yet, the error persists. please help!</p>
  <p>Thanks,</p>