title: Download PDF from Base64 string
body: <hr>
  
  <p>My situation (all in PHP):</p>
  
  <p>What I get: A Base64 encoded string from an API.</p>
  
  <p>What I want: A link to click on that downloads this document as an PDF. (I am sure it will always be a PDF file)</p>
  
  <p>I have tried this:</p>
  
  <pre><code>    $decoded = base64_decode($base64);
      file_put_contents('invoice.pdf', $decoded);
  </code></pre>
  
  <p>but I am kind off lost, can't seem to find a way to download it after decoding it.</p>
  
  <p>I hope someone can help me, thanks in advance!</p>