PDF’s not opening in browser from a sharepoint 2010 site?

I had this problem enough times that I wanted to capture the solution.

First of all, credit goes to Craig Lussier on the Technet forms, his post has the full solution and background.

http://social.technet.microsoft.com/Forums/en-US/sharepoint2010setup/thread/2f66404e-5193-46d3-b6b1-45cf72410432?prof=required

I used the above solution and it worked great.

I also found a script that I did not try. The script is described as being able to change this setting system wide by looping through each document library in each subsite of a given site – it could come in handy. (the script is by the same poster – Craig Lussier – Thanks Craig!

http://gallery.technet.microsoft.com/scriptcenter/Set-SPDocumentLibrary-0426781c

The code below is from the first link above, I’ve copied it here in case MS ever changes the link structure and the original post can’t be found. 

# SPAssignment
$gc = Start-SPAssignment

#Get Web
$web = $gc | Get-SPWeb "http://yourspweburl"

#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()

# End SPAssgment
$gc | Stop-SPAssignment

Leave a Reply