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