SharePoint 2010 prompts to save PDF documents when opening

2017-12-11T09:23:43+00:00 May 15th, 2013|Sharepoint|0 Comments

I have had a document library where every time i tried to open a pdf file i was only able to save the file locally instead of opening it in the browser.

The cause of this behaviour is SharePoint 2010 browser file handling.

I had been through and checked my settings at the web application level and ensured this was set to “permissive” which allows html and other content types which might contain script to be displayed directly in the browser. To enable to get pdf files to show I had to run power shell to enable MIME types for PDFs.

Open SharePoint management shell and run:

$webApp = Get-SPWebApplication http://Enter your site

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.”

Leave A Comment

like what you see? 

Sign-up to our newsletter and never miss out on the latest blogs, events and tech news from the world of risual
SUBSCRIBE!
Give it a try, you can unsubscribe anytime.