PDF is opened by default in SharePoint (not downloaded)

Source: Internet
Author: User

In sharepoint2010, you need to open the PDF file in the browser by default, instead of downloading it and opening it again. The client has installed the PDF plug-in.

1. Choose sharepoint2010 Management Center-ApplicationProgramSettings-General processing-Browser file handler (Browserfilehandling), Set to allow (Permissive), No header is added, allowing non-office documents to be opened directly.

The result is no problem on the first site. Some sub-sites can only be downloaded.

2. In the homepage website set function, disable "Open Document in client application by default"

After setting, it cannot be opened in the browser. The trail finds that the following header still exists. Normally, the following header does not exist.

Content-Disposition: attachment; filename = XXXXX. PDF

X-download-options: noopen

So I found the solution at http://www.pdfsharepoint.com/?point-2010-and-pdf-integration-series-part-1,No need to change the above settings

1 $ Webapp = Get-spwebapplication http: // localhost
2 If ( $ Webapp . Allowedinlinedownloadedmimetypes -Notcontains " Application/PDF " )
3 {
4 Write-host-foregroundcolor white " Adding pdf mime type... "
5 $ Webapp . Allowedinlinedownloadedmimetypes. Add ( " Application/PDF " )
6 $ Webapp . Update ()
7 Write-host-foregroundcolor white " Added and saved. "
8 } Else {
9 Write-host-foregroundcolor white " Pdf mime type is already added. "
10 }

Postscript:

Description in msdn: this property is ignored whenBrowserfilehandlingProperty is setPermissive.

ApplicationBrowserfilehandling is setPermissiveThe attribute settings of allowedinlinedownloadedmimetypes will be ignored,

The test result is not true. I don't know if there is a bug in sharepoint2010. I just played SP1: D.

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.