1

Currently using WSS 3.0 and I am using page viewer web part to display a PDF file though when the page loads, users are prompted with the file download box to open or save the file.

Running Internet Explorer 8.

How can I get the PDF File to display without the File Download prompt?

1

To open pdf file in browser use this code

                        WebClient client = new WebClient();
                        Byte[] buffer = client.DownloadData("address of pdf file");
                        Response.ContentType = "application/pdf";
                        Response.AddHeader("content-length", buffer.Length.ToString());
                        Response.BinaryWrite(buffer);
                        Response.Flush();
                        Response.End();
  • Thank you for the code though where do I insert it? The PDF file is currently viewed via Page Viewer webpart. – Marina Nov 19 '12 at 12:43
  • Hi Marina no idea how you can done with page view webpart but you can do it with CEWP Please check this link sharepointsharon.com/2010/08/embedding-pdfs – Vishal_Sharepoint Nov 19 '12 at 13:20
0

Please check if MiME type (Pdf) are added to the IIS . By default,it will be blocked to open directly in SharePoint .

If it happens only for specific users then it must be IE Settings .

Thanks, Aravind.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.