Sep 14, 2010

Opening PDFs in SharePoint 2010

So, Microsoft made a change to how SharePoint opens PDFs in SharePoint 2010. Now you gotta enable click and open functionality as an admin, or the user will have to download it and then open it from his workstation.


Apparently this is a feature to prevent buggy applications, like Microsoft deems Adobe Acrobat Reader to be, from running hostile code embedded in the PDF. By default SharePoint sends a new HTTP header called X-Download-Options and sets it to noopen. IE 8 interprets this as "must save to HD before opening". Most normal users, and especially those within intranets, don't care much about the rotten tomatoes that Microsoft, Apple and Adobe throw at each other (they call each other's applications leaky and buggy all the time). We just want to open our PDFs in our browser, and nevermind their security innuendo.

Disabling this "feature" is simple. Head into Central Admin, go to the Manage Web Applications section and highlight the Web App you wanna open PDFs in (probably all of them, one by one). Then click General Settings and change "Browser File Handling" from Strict to Permissive.

If you wanna test your settings, you can run this Powershell script (you probably want to change the URLs)

$site = Get-SPSite(“http://intranet")
$web = $site.OpenWeb("/market")
$list = $web.GetList("http://intranet/market/PDFs")
Write-Host $list.browserfilehandling


 
If your settings were applied correctly, your list should be marked as Permissive, which will be echoed into the Powershell command line.

No comments:

Post a Comment