0

I'm creating an iframe in order to print a PDF that comes from an Azure Blob storage. This PDF is loaded correctly, but for any reason, it has the src attribute but not the body:

<iframe class="pdf-viewer" ng-if="f.isIframeable"
        src="https://docs.google.com/viewer?embedded=true&url=httpsmypdfurl.pdf">
    #document
    <head></head>
    <body></body>
</iframe>

Original code of the iframe:

<iframe class="pdf-viewer" ng-if="f.isIframeable" src="{{f.url | srcViewer}}">
</iframe>

Why is this happening even if my src is correct? How can I try to reload it or ensure it works?

georgeawg
  • 48,608
  • 13
  • 72
  • 95
Sonhja
  • 8,230
  • 20
  • 73
  • 131
  • It looks like AngularJs is blocking the domain with it being external from your page, what is your filter `srcViewer` doing? It should be returning the URL as a trusted resource like `$sce.trustAsResourceUrl(url);` – MikeS Nov 11 '19 at 14:41
  • No content is permitted in an ` – georgeawg Nov 11 '19 at 16:48

0 Answers0