I use the below code to display a pdf file. When I run this from visual studio on my local pc adobe launches and displays the pdf file normally. When I deploy the same code to the web hosting site adobe does not launch. I simply get a blank screen. Has anyone else experienced this problem? outbyte = (byte[])attribRow.modelPicture; Response.ClearContent(); Response.ClearHeaders(); Response.BufferOutput = true; Response.ContentType = 'Application/pdf'; Response.BinaryWrite(outbyte); thanks Frank /emoticons/idea.gif
You are missing the headers. Response.AddHeader("content-disposition","attachment; filename=mypdf.pdf"); Aristotle DiscountASP.NET www.DiscountASP.NET
Thanks for the post. I am reading the pdf file from a blob in the database so I believe that this is already present. I only seem to have the issue when using IE. If I use Firefox the adobe launches and the pdf is displayed correctly. Frank
I have checked this issue on Google. I am using IE7 and apparently there are problems with IE7 and pdf files.