1

I am trying to load PDF as memory stream, which is got using web api, using Embed element. This works fine in Chrome but not in IE. I need this to be working in IE. Any clues please.

HTML:

<div id="pdfCont" style="height: 800px"/>

Here is the Javascript code I am using:

$http({method: 'GET', headers: {'Content-Type': 'application/json'}, url: urlString, responseType : 'arraybuffer'})
  .success(function(data, status, headers, config){
    var file = new Blob([data]);
    var fileURL = $scope.createObjectURL(file);
    var blobUrl = fileURL;                   
    $scope.content = $sce.trustAsResourceUrl(fileURL);
    var doc = $('<embed id=pdfDoc src="' + $scope.content + '" type="application/pdf" />');                    
    $('#pdfcont').empty().append(doc);
  })
  .error(function(data, status, headers, config) {
  });

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.