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 IFrameThe <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

Popular posts from this blog

Send API POST Request in MS SQL Server

Configure the API gateway in Microservices Architecture with example in .NET Core

Use immutable data structures to avoid unnecessary change detection In Angular

Delete Empty Rows or Null Rows in Datatable in C#

How To Setup Angular 10 Environment On Windows

Content Negotiation in Web API with example

Map Operator in RxJs

How to Create Custom DialogBox using JQuery

HTTP and grPC Communication protocols used in Microservices

Angular Code Optimization Techniques and Methods