function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
NHKNHK 

Iframe Not Working in IE11

I have a VF page which contains an iFrame as shown below.
<apex:page controller="SomeController" action="{!callWebService}" sidebar="false" showHeader="false">
    <apex:iframe src="data:application/pdf;content-disposition:attachment;base64,{!pdfString}" width="100%" height="600"/>
</apex:page>

pdfString is the string i am getting from the web service callout response as below.
pdfString = EncodingUtil.base64Encode(response.getBodyasBlob());

I am able to view the PDF in Chrome and FireFox, but in IE i am getting a blank white screen. Can some one please help me resolve this issue?

Best Regards,
NHK
 
pconpcon
If you open the javascript console for this page do you see any errors?
NHKNHK
Pcon, i am not getting any errors but i am getting the below 2 warnings.
HTML1524: Invalid HTML5 DOCTYPE. Consider using the interoperable form "<!DOCTYPE html>".
DOM7011: The code on this page disabled back and forward caching. For more information, see: http://go.microsoft.com/fwlink/?LinkID=291337
NHKNHK
Not only the iFrame, but also the <object> and <embed> tags not displying the PDF in IE where as it is working in Chrome and FireFox.

Example:
<object data="data:application/pdf;base64,{!pdfString}" width="100" height="100"/>
OR
<embed src="data:application/pdf;base64,{!pdfString}"/>

Forf object and embed tags, it will display a black 'X' symbol in IE.

 
pconpcon
And you have your browser configured to auto load PDFs without any sort of interaction?  I know that my Chrome is configured to not run any plugins (including PDFs) unless I specfically allow it.
NHKNHK
I haven't done anything explicitly to allow chrome and FF to load pdf's. So is there a setting that i need to do in IE to display the PDF? Best, NHK
pconpcon
To be honest I do not know (I don't use IE).  I'd make sure that you have adobe installed and correctly configured to render pdfs (I'd check somewhere other than Salesforce to test this) and then look through the security controls.  Don't forget that Chrome and Firefox both have their own PDF rendering engine so they do not use plugins to render PDFs.  I don't know about IE.
NHKNHK
PDF's are properly rendering from other sites as well as in Salesforce when i open an attachment. Not sure why its not opening in a VF page when i use an iFrame or an Object.