title: Is there a good alternative for embedding a PDF with HTML next to using a local file path, online file path or data source as base64-string?
body: <p>I am building a web app and I would like to show PDF files to my users. My files are mainly stored as byte arrays in the database as they are generated in the backend. I am using the <code>embed</code> element and have found three ways to display a PDF:</p>
  <ol>
  <li>Local file path in <code>src</code> attribute: Works, but I need to generate a file from the database byte array, which is not desirable as I have to manage routines to delete them once they are not needed anymore.</li>
  <li>Online file path in <code>src</code> attribute: Not possible since my files may not be hosted anywhere but on the server. Also has the same issues as the previous method anyway.</li>
  <li>Data as base64 string in <code>src</code> attribute: Current method, but I ran into a problem for larger files (&gt;2MB). Edge and Chrome will not display a PDF when I covert a PDF of this size to a base64 string (no error but the docs reveal that there is a limit for the data in the <code>src</code> attribute). It works on Firefox but I cannot have my users be restricted to Firefox.</li>
  </ol>
  <p>Is there any other way to transmit valid PDF data from a byte array out of the database without generating a file locally?</p>