Tuesday, July 12, 2011

SharePoint 2010 - PDF Security

IE8 and PDF files in SharePoint don't necessarily play nice together for a reason - security. By default you'll click on your PDF and get an option to either Save or Close. Here's a good explanation and the reason you should use an ‘Inline Download’ exclusion as opposed to the common (but not recommended) Browser File Handling setting in Central Admin.

Quick link to share via JB's Just Saying...

PowerShell Script:

$webApp = Get-SPWebApplication http://webapp.domain
 If ($webApp.AllowedInlineDownloadedMimeTypes -notcontains "application/pdf")
 {
   Write-Host -ForegroundColor White "Adding Pdf MIME Type..."
   $webApp.AllowedInlineDownloadedMimeTypes.Add("application/pdf")
   $webApp.Update()
   Write-Host -ForegroundColor White "Added and saved."
 } Else {
   Write-Host -ForegroundColor White "Pdf MIME type is already added."
 }


In addition, if you want your PDFs to open in a new window or even in Adobe Reader you'll want to change your local Adobe Reader client settings:

Open Adobe Reader
Select “Edit” –> “Preferences” from the menu system.
Select the option on the left called “Internet”
Either select or de-select the option called “Display PDF in Browser” depending on your preference.

SharePoint Administrators, don't forget your PDF iFilter for searching those PDFs!

No comments:

Post a Comment