开发者

Why are SharePoint pdfs no longer opening from within the browser?

I have upgraded a SharePoint, excatly same code, but now links to pdfs always prompt to save and dont open from within the browser (which they do on the old server)

old server is named: localintranet new server is my local machine: 开发者_Go百科myserver:3200 (yes its on port 3200)

Any ideas?

I did try adding my server to the list of local intranet machines in internet explorer to no avail.

I have tried both href=file.pdf target=_blank and onclick=window.open('file.pdf');return false; in the anchor tag

driving me nuts!


Try to add

AddType application/pdf .pdf

line into your .htaccess file in the http root folder of your web server.


Two things:

  1. to be sure check: Adobe Reader. Choose Edit > Preferences. Select Internet in the list on the left. Display PDF in Browser should be OK.

  2. probably server sends header for .pdf to download it, instead open inline?

    Header set Content-Disposition inline


You gotta love microsoft

http://blog.brainlitter.com/archive/2010/05/19/sharepoint-2010-treats-pdf-and-other-file-types-as-insecure.aspx

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜