Document Library Prompts to Save PDF Although Web Application Set to Permissive

Problem: Users are prompted to save the file when clicking a PDF document link in SharePoint, and no option is given to open the file without saving. This behavior may not be universal, and may affect only a single or a few document libraries, while the remaining libraries open the document as expected.

Cause: By default, SharePoint 2010’s handling of documents in the browser is set to “Strict,” a setting which, with some file type exceptions, will not allow documents to be opened directly in the browser. Most users notice this when attempting to open files of type PDF. While this setting is set in Central Administration* at the web application level, and making a change there should affect the BrowserFileHandling property of all libraries within the web app, in some cases a library may “lose” this setting and may retain a different property setting than the rest of the libraries within the web app.  Most cases mention some type of customization of the library (adding a content type, creating the library from a template, etc.) as the action initiating the setting change.

Resolution: Each library has a BrowserFileHandling property. Craig Lussier (http://social.technet.microsoft.com/Forums/en-US/sharepoint2010setup/thread/95a9f8fa-3da6-4bb7-9983-2102910ff4aa ) offers the following PowerShell commands to verify and/or update the property for the given library:

  • #Get Document Library
  • $docLib = $web.lists[“Your Document Library Title”]
  • #View all properties/methods of the Document Library and you’ll see that BrowserFileHandling is a property
  • $docLib | Get-Member
  • #See the current BrowserFileHandling setting for the Document Library
  • $docLib.BrowserFileHandling
  • #If you need to change it from Strict to Permissive
  • $docLib.BrowserFileHandling = “Permissive”
  • $docLib.Update()

Another user states that this issue is reportedly fixed in the Dec 2010 Cumulative Update.

Cautions: While this script fixed the problem, researching the issue reveals the potential security risk involved with the “Permissive” setting. As an all-or-nothing setting, SharePoint will not only open PDFs in the browser, but may also open other types of files, including those that may contain malicious content. As an alternative, administrators may choose to add the PDF file type to the list of exceptions to the strict file handling setting, as described here: http://www.pdfsharepoint.com/sharepoint-2010-and-pdf-integration-series-part-1/ .

*From Central Administration, Manage Web Applications>Select the Web App>General Settings>General Settings> Browser File Handling

Advertisements

About Joy Lavigne (Adkins)

SharePoint Administrator for a mid-sized organization. Frequent speaker at SharePoint Saturday events. Teller of terribly corny jokes. View all posts by Joy Lavigne (Adkins)

6 responses to “Document Library Prompts to Save PDF Although Web Application Set to Permissive

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: