Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4616402
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T01:58:34+00:00 2026-05-22T01:58:34+00:00

Currently, I have an issue with populating an iframe that I have with a

  • 0

Currently, I have an issue with populating an iframe that I have with a PDF document, but this issue only occurs in IE.

Basic Layout:

I have a screen that contains a list of items (attachments), which can be images, text or pdf. When the user clicks on one of these items – it will make a call to a controller action [ViewAttachment] which will return the requested item and display it in the iframe.

This currently works for all data types with the exception of PDFs in IE. (Firefox, Chrome etc. all display the PDF in the iframe without issue.)

I previously was using Adobe Reader 9, and recently upgraded to 10 in hopes of solving this issue. I’ll attach some code to see if anyone has any suggestions as to how to possibly resolve this.

Code to Populate iframe: (Moved to two lines for readability)

$(".viewattachment").live('click',function () 
{ 
   $("iframe#test").attr("src","<%=Url.Action("ViewAttachment","Images") %>?
   attachment=" + $(this).next().val());
}); 

ViewAttachment Controller Action:

public ActionResult ViewAttachment(string attachmentGuid)
{
      Attachment attachment= imageAgent.GetAttachment(attachmentGuid);

      Stream resultStream = new MemoryStream();
      resultStream =  StorageProviders[attachment.ProviderName]
                      .ReadFile(attachment.FileReference);

      resultStream.Position = 0;
      FileStreamResult result = new FileStreamResult(resultStream, 
                                                     attachment.ContentType);

      return result;
}

Notes:

  • I’ve attempted toggling the “Display PDF in Browser” in Adobe Reader without any success.
  • Currently testing this for IE8.
  • When clicking on a PDF to view – the iframe simply remains at it’s previous content and doesn’t change at all.
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T01:58:35+00:00Added an answer on May 22, 2026 at 1:58 am

    After several different methods and iterations of testing – I determined that it was a conflict between IE8-9 and versions of Adobe Reader 9-10. I added the following meta tag to the window containing the iframe and it resolved all of the issues:

    <meta http-equiv="X-UA-Compatible" content="IE=7" />
    

    This should at least work until an update / fix is made.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I do not currently have this issue , but you never know, and thought
I have a database issue that i currently cannot wrap my head around with
I currently have an issue in my DLR language implementation where subsequent calls to
I have a strange issue: I am using SPContext.Current.Web in a .aspx page, but
I currently have an MS Access application that connects to a PostgreSQL database via
I have some data which I am formatting like this: // ... imagine populating
I have a ListView that I am populating with items from an ObservableCollection .
I have currently created a facebook like page that pulls notifications from different tables,
I currently have a single svn project for all work on a website. But
I currently have a network camera that streams video as a .swf (and also

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.