PDF文件无法在浏览器中打开sharepoint 2010

时间:2014-01-15 08:01:00

标签: sharepoint pdf sharepoint-2010 sharepointdocumentlibrary

最近,我们在Sharepoint 2010中将我们的Web应用程序从一台服务器移动到另一台服务器。整个Web应用程序的备份已在另一台服务器中进行并恢复。但是在新服务器中,文档库中的PDF文件不会在浏览器中打开。它总是在浏览器中打开

我已经做了以下更改,但没有工作

  1. 将浏览器文件处理设置为来自中央管理员的Permissive
  2. 在doc library的设置中设置“在浏览器中打开”
  3. 使用设置文档库文件处理属性 $ docLib = $ web.lists [“你的文档库标题”] $ docLib.BrowserFileHandling =“Permissive” $ docLib.Update()

  4. 在网络应用中添加了“AllowedInlineDownloadedMimeType.Add(”Application / Pdf“)

  5. 在客户端计算机中安装了Adober eader
  6. 即使尝试了所有这些,PDF文件仍然在客户端应用程序(Adobe阅读器)中打开,但不在浏览器中打开

    如果有人为此提供解决方案,那将是非常有帮助的。我一直在敲打这两天

    此致

2 个答案:

答案 0 :(得分:0)

您需要将MIME类型添加到SharePoint 2010才能启用此功能 - 并且需要在Farm级别完成。

here上的powershell会这样做; (我没有运行它,但它是Technet所以源应该是好的)

# <#  
# .DESCRIPTION  
# 
#  This script adds new MIME type to "AllowedInlineDownloadedMimeTypes" property list     of defined SharePoint 2010 Web Application. 
# 
#  Script prompts you for MIME type and Web Application URL. 
# 
#  Code shall run in context of Farm Administrators group member. 
#  
# .NOTES  
#       File Name   : Add_MIME_Type.ps1  
#       Author      : Kamil Jurik, WBI Systems a.s.  
#       Created     : 11/12/2011  
#  

If ( (Get-PSSnapin -Name "Microsoft.SharePoint.PowerShell" -ErrorAction     SilentlyContinue) -eq $null ) { 
Add-PSSnapin "Microsoft.SharePoint.PowerShell" 
} 

Get-SPWebApplication 

$WebApp = Get-SPWebApplication $(Read-Host "`nEnter Web Application URL") 

Write-Host `n"Mime Type Examples:"`n"application/pdf, text/html, text/xml"`n 

If ($WebApp.AllowedInlineDownloadedMimeTypes -notcontains ($MimeType = Read-Host "Enter    a required mime type")) 
{ 
  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." 
} 

答案 1 :(得分:0)

您可以将“浏览文件处理”属性设置为“允许”

http://technet.microsoft.com/en-us/library/cc262107(v=office.14).aspx