I\'m trying to display a PDF(which is created in the server side and pass to the client side as a web stream) through an AJAX call. My code is given below:
j
create an "object url" from the blob that you can load into the iframe
axios({
url: `path/to/pdf`,
method: "GET",
responseType: 'arraybuffer'
}).then((response) => {
let blob = new Blob([response.data], { type: response.headers['content-type'] } );
let url = window.URL.createObjectURL(blob);
$('#frame').attr('src',url);
});