What is the recommended way to embed PDF in HTML?
What does Adobe say itself about it?
In my
Before I got a problem with embeding base64 encoded with PDF because the URI limitation, so any files over 2MB won't render properly on Chrome.
My solution is:
Convert uri encoded to Blob:
Generate the temporary DOM String base on Blob.
const blob = dataURItoBlob(this.dataUrl);
var temp_url = window.URL.createObjectURL(blob);
Decide where you want to attach the iframe to DOM:
const target = document.querySelector(targetID);
target.innerHTML = `