Configuring SharePoint to allow opening PDF files and other “non-trusted” file types from a browser

Pdf Files

By default, SharePoint doesn’t consider file-types such as PDF documents to be save for opening from a browser. SharePoint adds an additional security header and the browser will force the user to save the files first on the local disk before opening them. There is a list of allowed MIME types to be opened in the browser directly and PDF files are not on that list.

Do the following steps in order to allow users to open “non-trusted” files directly from the browser:

  1. In SharePoint Central Administration, click on the Application Management section.
  2. On the Application Management page, in the Web Applications section, click Manage Web Applications
  3. Select the Web Application that you want to modify.
  4. Click on the General Settings icon in the ribbon.
  5. Change the value Browser File Handling to Permissive

A more secure way to permit opening a certain “non-trusted” file types, such as PDF, directly from the browser is to extend the allowed MIME types list. All we have to do is add the PDF MIME type to this list, using PowerShell is to run the following PowerShell commands:

$webapp = Get-SPWebApplication <your webapp url> $webapp.AllowedInlineDownloadedMimeTypes.Add(“application/pdf”)
$webapp.Update()

See this article for more information about browser file handling in SharePoint: http://social.technet.microsoft.com/wiki/contents/articles/8073.sharepoint-browser-file-handling-deep-dive.aspx