Display PDF Or Tiff Files In IFrame
How to Display PDF Or Tiff Files In IFrame in Asp.net C#
Example: In this application how to display PDF or tiff files in IFrame in asp.net C#.
First We have to Know about IFrame, The <iframe> tag specifies an inline frame.
An inline frame is used to embed another document within the current HTML document.
Mostly Iframe does not support to show the PDF files Or Tiff Files in Google Chrome and Firefox browsers,Only supports in IE Browser.
For my Requirement in this application I want to show the PDF File in IFrame, which is in local shared folder (\\IPAddress\SharedFolder\Filename.PDF). I want to give this path to IFrame like
<iframe id="imgdisplay" src="" runat="server">
Mostly Browser Compatibility Issues for IFrame ,see below
1. In IE Browser, If we call this path in iframe src it will displays the PDF file.
Ex: imgdisplay.attributes["src"]="\\IPAddress\SharedFolder\Filename.PDF";
2. In Firefox Browser, If we call this path in iframe src it will doesn't support to display the PDF file, It will displays the white image.
Ex: imgdisplay.attributes["src"]="\\IPAddress\SharedFolder\Filename.PDF";
3. In Google Chrome Browser, If we call this path in iframe src it will doesn't support to display the PDF file, It will displays the white image.
Ex: imgdisplay.attributes["src"]="\\IPAddress\SharedFolder\Filename.PDF";
For These Related Issues I have Created the Sample Application to Display the PDF File in IFrame.
Comments
Post a Comment