A very old post I forgot to publish about enabling SharePoint browser support of PDF
If you have a default SharePoint 2010 setup you would notice that when you go to open a Pdf file SharePoint prompts you to save it rather than opening.
The cause of this behavior is SharePoint 2010 Browser File Handling. This
property is on SharePoint Web Application level and its value determines how
files are treated in the browser. “Strict” specifies that MIME content types
which are not listed in “AllowedInlineDownloadedMimeTypes” are forced to be
downloaded. “Permissive” specifies that the HTML and other content types which
might contain script are allowed to be displayed directly in the browser.
Source: http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.administration.spwebapplication.browserfilehandling.aspx
“AllowedInlineDownloadedMimeTypes” is a collection of MIME types. This list
of MIME types does not contain MIME type of Pdf documents by default. It is
important to understand that by adding Pdf MIME type to IIS settings you will
not solve this issue.
Solution
#1 (via User Interface):
The solution is to change Browser File Handling property on Web Application
level. For that you need to be a Farm Administrator. Steps to change Browser
File Handling property:
- 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
Now, your Pdf document will be opened in the browser.
Limitation
#1:
Once you enabled “Permissive” Browser File Handling, SharePoint will allow
all documents be opened in the browser. Today, there is no “out-of-the-box”
option to allow Permissive option for Pdf documents only.
No comments:
Post a Comment