Unable to open pdf attachments from SP2010 site?


By default SharePoint 2010 does not allow you to open PDF documents directly and you will get following message if you try to open the pdf documents from SP2010 directly:

why?

In Internet Explorer 8 Microsoft added a security feature to prevent script injection vulnerabilities caused by buggy client software. This feature is activated by a new HTTP header called X-Download-Options which can be set to noopen. When that header is passed with a file attachment Internet Explorer 8 will not provide the option to directly open the file, instead you must first save the file locally and then open it.
SharePoint 2010 utilizes this enhanced security feature in IE 8 to block the opening of file types it considers vulnerable to scripting or other attacks, such as PDFs.

Workaround: (This these changes only if it is really required as it adds security risk to the environment)

  • Go to SharePoint 2010 Central Administration > Application Management > Manage Web Applications
  • Select the row of your web application
  • Click General Settings in the ribbon
  • Scroll down to Browser File Handling and select Permissive
  • Click Ok