PDF Document won’t have “Open” option when accessing from Share point Doc Library from Internet Explorer 8
Users when they try to open PDF file from Internet Explorer 8, they won’t have the button “Open”.
Internet Explorer 8 treats the web applications that need to serve untrusted HTML files, the user is prevented from opening a file download directly; instead, they must first save the file locally. When the locally saved file is later opened, it no longer executes in the security context of your site, helping to prevent script injection.
Internet Explorer 8 has a mechanism to help prevent the untrusted content from compromising your site’s security. When the new X-Download-Options header is present with the value noopen.
To overcome, we need to allow the Content Type “application/pdf”, using the Powershell Scripts with the Webapplication.
$WebApp = Get-SPWebApplication $(Read-Host "`nEnter Web Application URL")
If ($WebApp.AllowedInlineDownloadedMimeTypes -notcontains ("application/pdf"))
{
Write-Host -ForegroundColor White `n"Adding" $MimeType "MIME Type to defined Web Application"$WebApp.url
$WebApp.AllowedInlineDownloadedMimeTypes.Add($MimeType)
$WebApp.Update()
Write-Host -ForegroundColor Green `n"The" $MimeType "MIME type has been successfully added."
} Else {
Write-Host -ForegroundColor Red `n"The" $MimeType "MIME type has already been added."
}
(Or)
$webapp.AllowedInlineDownloadedMimeTypes.Add ("application/pdf")
$webapp.Update ()
After executing the scripts, it will have the open button.
Regards,
Ratsub
Comments
Post a Comment
Enter your comments..