OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

PDF Blob - Pop up window not showing content

  • Thread starter Thread starter Simo Mafuxwana
  • Start date Start date
S

Simo Mafuxwana

Guest
I have been working on this problem for the last few days. With no luck on trying to display the stream on <embed src> tag, I just tried to display it on a new window.

The new window shows PDF controls only
enter image description here
)

Any idea why the content of the pdf is not showing?

CODE:

Code:
$http.post('/fetchBlobURL',{myParams}).success(function (data) {
    var file = new Blob([data], {type: 'application/pdf'});
    var fileURL = URL.createObjectURL(file);
    window.open(fileURL);
});

<p>I have been working on <a href="https://stackoverflow.com/questions/21628378/angularjs-display-blob-pdf-in-an-angular-app">this problem</a> for the last few days. With no luck on trying to display the stream on <code><embed src></code> tag, I just tried to display it on a new window.</p>

<p>The new window shows PDF <strong>controls only</strong> <img src="https://i.sstatic.net/kXNGD.png" alt="enter image description here">)</p>

<p>Any idea why the content of the pdf is not showing?</p>

<p><strong>CODE:</strong></p>

<pre><code>$http.post('/fetchBlobURL',{myParams}).success(function (data) {
var file = new Blob([data], {type: 'application/pdf'});
var fileURL = URL.createObjectURL(file);
window.open(fileURL);
});
</code></pre>
 

Latest posts

I
Replies
0
Views
1
impact christian
I
Top