I have a PDF that is being shown through an iFrame that works as expected on Chrome and Firefox, but is just showing a blank page with IE11.
Here is the entire visualforce page for the iFrame:
<apex:page controller="MyControl" showHeader="false" sidebar="false">
<apex:iframe id="frame" src="{!pageRefPDF}"/>
<script>
document.getElementById('frame').height = window.innerHeight;
</script>
</apex:page>
And here is the code that creates that pageRefPDF string:
PageReference ref = new PageReference('/apex/OutputPDF?id=' + accountId);
Blob contentData;
if (Test.isRunningTest()){
contentData = Blob.valueOf('pdfBody');
} else {
try{
ContentData = ref.getContent();
pageRefPDF = 'data:application/pdf;base64,' + EncodingUtil.base64Encode(contentData);
} <catch code follows>
And a bit further below there is a line that returns a new PageReference of the first block above.
It shows if I change the src to "https://example.com", but there are no errors in the IE console, I have tried on multiple computers (different networks), changed some of the IE security settings, and added the domain to the trusted sites list. Any ideas about what might be causing this in IE but not other browsers?