I need to display an pdf file in iframe tag using JavaScript
Here is my iframe
<iframe id="iframeFile" name="iframeFile" src="" width="100%" height="100%" title="File" scrolling="auto" style="position:relative;"></iframe>
$('#iframeFile').attr('src', '');
pdf is displaying in chrome and firefox. But in internet explorer it shows white blank screen.
Does it show the option to download the file when you try to open it in IE 11?
Try to check the Adobe Shockwave add on is installed and enabled in Internet Explorer.
If it is not available or disabled than IE can show you the blank screen and prompt you to download the PDF file to view it locally.
If it is not available in your IE add on list than you can download it from Adobe website.
Adobe Shockwave Player
Related
Trying to display a PDF in an iframe, it works perfectly on desktop view, but when I try to load it from Tablet or Mobile it does not display. The body element of the iframe then says "no enabled plugin supports this MIME type". I can, however, load the PDF on desktop view then change to tablet or mobile and it will display. Any ideas on how to get it to load on the tablet and mobile views?
Here's the iframe:
<iframe id="documentObject" name="documentIframe" src={fileSrc} title={fileName} height="100%" width="100%" />
I am embedding pdf file in iframe using iframe tag.
To disable download option I am using #toolbar=0&scroolbar=0 which is working fine for Google Chrome, Mozilla etc.
But in Safari browser from MAC OS it is not working and a toolbar is popping up on mouse hover and download option is available in that toolbar. I want to hide that toolbar.
I tried using embed tag with #toolbar=0&scroolbar=0 as well but its not working.
I have added screenshot for your reference. Any help is highly appreciated.
Click on this link to see screenshot in which toolbar with download option can be seen
The following code has been used to render the pdf in browser. It works fine in chrome browser but it doesn't work in Safari browser in ipad. It just renders the first page of pdf. Another observation is the first page is converted into image (as per the console)
<embed src={props.filePath} height="900" width="100%" type='application/pdf'/>
In my application I show a pdf embedded in my browser page in this way:
<div>
<object ng-if="vm.ShowPanel" data="{{'data:application/pdf;base64,'+ vm.URL}}"
style="width:100%; height:99%; overflow-y:hidden" type="application/pdf"></object>
</div>
This approach works perfectly in Chrome but as known not in Internet Explorer.
Is there a workaround to perform that action in IE?
I was thinking about saving the file locally and then read it in my object tag.
Could it work?
thanks
I have the following code to embed a pdf file on my site:
´<object data="path_to_pdfFile.pdf" type="application/pdf" width="800" height="500">
<p>Your browser doesn't support have a PDF Plugin. Instead you can Click here to download it</p>
</object>´
..It works just fine on desktop browsers (firefox, chrome, iE and even on Safari) but it happens when i go to my smartphone, it doesn't display the content of my pdf file but shows the "This Plugins is not supported" instead or something like that. Sometimes it doesn't even show anything but a gray frame.
Last time i heard browsers are not using nothing with adobe but i'm not sure what to do todisplay my content on mobiles and tablets.