I'm trying to show a PDF on an HTML page but it does not show anything in firefox, I tried it in chrome and there it shows, using the following code.
<div ng-if="downloaded">
<object ng-bind="pdfcontent" data="{{pdfcontent}}" type="application/pdf" width="100%" height="800px">
</object>
</div>
In my controller I have the following code I get a base64 of a REST service and I convert it to blob assigning it to variable pdfcontent
var blob = b64toBlob($scope.listaDocumentosById[index].docto, $scope.listaDocumentosById[index].tipo_docto);
var fileURL = URL.createObjectURL(blob);
$scope.pdfcontent = $sce.trustAsResourceUrl(fileURL);
$scope.downloaded = true;
I tried to use the function window.open(fileURL);
but only shows the pdf in chrome but not in firefox.