title: How to preview pdf using active storage and poppler?
body: <p>I'm trying to display a preview of the uploaded pdf in my application but all I get so far is a broken image. </p>
  
  <p>I have installed the poppler gem as suggested in the active storage presentation for preview.  </p>
  
  <p>Then i tried different ways but all are returning a broken image. </p>
  
  <pre><code>&lt;%= link_to bank.rib, rails_blob_path(bank.rib, disposition: "preview") %&gt;
  </code></pre>
  
  <p>or</p>
  
  <pre><code>&lt;%= image_tag bank.rib %&gt;
  </code></pre>
  
  <p>or</p>
  
  
  
  <p>where '<code>rib</code>' being the attached file (<code>has_one</code>) of the model <strong>BankAccount</strong> (here <code>bank = BankAccount.find(id)</code>)</p>
  
  <p><code>bank.rib.previewable?</code> returns <code>true</code>.</p>