PDF streaming in IFRAME not working in Firefox

Last post 08-19-2008 6:13 PM by Mr.Wrong. 3 replies.

Sort Posts:

  • PDF streaming in IFRAME not working in Firefox

    05-25-2007, 10:14 AM
    • Loading...
    • renemt
    • Joined on 11-02-2006, 2:11 PM
    • Berlin, Germany
    • Posts 31

    Hi everybody!

    I want to display a PDF document embedded in a web site. I'm using an IFRAME for this which has an ASPX as source. This ASPX is streaming the PDF using the well-known schema:

     

            Response.Buffer = true;
    Response.Clear();
    Response.ClearContent();
    Response.ClearHeaders();
    Response.ContentType = "application/pdf";
    Response.AddHeader("Content-Length", pdfBuffer.Length.ToString());
    Response.AddHeader("Content-Type", "application/pdf");
    Response.AddHeader("Content-Disposition", "inline;filename=" + contentDispositionFilename);
    Response.BinaryWrite(pdfBuffer);
    Response.End();

     
    In IE everything looks good - the Acrobat plugin is loaded into the IFRAME, showing the streamed PDF file. But in Firefox nothing happens inside the IFRAME - it even is not repainted. When I load the "PDF-streaming site" directly in Firefox the Acrobat plugin works as expected, showing the document inside the browser.

    I guess, the problem may be that Firefox seems to ignore the headers sent by the page loaded into the IFRAME.

    A possible workaround would be to save the generated PDFs to disk and provide a link to them to allow the user to download the files. But for various reasons (sensitive data, disk space management etc.) I don't want to do this and just stream the files. 

    Does anyone have any helpfull experiences or hints concerning this issue?

     

    Regards,

    ReneMT 

    Filed under: , , ,
  • Re: PDF streaming in IFRAME not working in Firefox

    05-28-2007, 2:00 AM
    Answer

    Hi,

    See the following URL:

    http://www.developershed.com/esupport/index.php?_m=knowledgebase&_a=viewarticle&kbarticleid=55&nav=0#

    This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.

    Hope it helps,

    Hong Gang

     

    Sincerely,
    Ocean
    Microsoft Online Community Support
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as
    Answer” if a marked post does not actually answer your question.
  • Re: PDF streaming in IFRAME not working in Firefox

    06-15-2007, 3:58 AM
    Answer
    • Loading...
    • renemt
    • Joined on 11-02-2006, 2:11 PM
    • Berlin, Germany
    • Posts 31

    A short note to the final state of this problem:

    After nothing else did help in any way I'm now using an URL rewriting component (UrlRewriting.net) and let the source of the IFRAME point to a PDF document. The rewriting will map this call to the actual PDF producing ASPX page. With this construction, the inline display also works in Firefox without problems.

  • Re: PDF streaming in IFRAME not working in Firefox

    08-19-2008, 6:13 PM
    • Loading...
    • Mr.Wrong
    • Joined on 08-19-2008, 6:11 PM
    • Posts 1

    Hello,

    I'm looking for an example of streaming a PDF into a IFRAME. Do you have an example of your solution?

     Regards,

    Michiel Wiegers
    mwiegers@xs4all.nl

Page 1 of 1 (4 items)
Microsoft Communities
Page view counter