By the default setting of a SharePoint 2010, a users can’t open PDF files and many other files types (see the bottom of the post for all default file type allowed to download http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.administration.spwebapplication.allowedinlinedownloadedmimetypes.aspx) direct from SharePoint, neither “Display PDF in browser” mode or in the download popup, where the “open” button is missing.
The thing is SharePoint 2010 adds an additional security header to force the file to be saved to the disk before the users can open it. To fix this the BrowserFileHandling property should be set to “permissive” http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spbrowserfilehandling.aspx. This property exist both on a webapplication level http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.administration.spwebapplication.browserfilehandling.aspx and a on document library level http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.splist.browserfilehandling.aspx.
To fix this on a webapplication level, by using the GUI.
- Open Central Administration
- Application Management
- Manage Web Applications
- Select the webapplication to change
- Click General Settings in the ribbon
- Scroll down to Browser File Handling and select Permissive
- Click on the OK button
To fix this with PowerShell on a webapplication level
Get-SPWebApplication http://vsitsp01 | % { $_.BrowserFileHandling = "permissive"; $_.update() }
To fix this with PowerShell on a document library level
$spweb = Get-spweb http://vsitsp01
$doclib = $spweb.Lists["Documents"]
$doclib.BrowserFileHandling
$doclib.BrowserFileHandling = "permissive"
$doclib.Update()
File types allowed to be download:
application/directx
application/envoy
application/fractals
application/internet-property-stream
application/liquidmotion
application/mac-binhex40
application/ms-infopath.xml
application/msaccess
application/msword
application/oda
application/oleobject
application/onenote
application/pics-rules
application/pkcs10
application/pkcs7-mime
application/pkcs7-signature
application/pkix-crl
application/postscript
application/rtf
application/set-payment-initiation
application/set-registration-initiation
application/streamingmedia
application/vnd.fdf
application/vnd.ms-excel
application/vnd.ms-excel.12
application/vnd.ms-excel.addin.12
application/vnd.ms-excel.binary.12
application/vnd.ms-excel.macroEnabled.12
application/vnd.ms-excel.macroEnabledTemplate.12
application/vnd.ms-excel.template.12
application/vnd.ms-office.calx
application/vnd.ms-officetheme
application/vnd.ms-pki.certstore
application/vnd.ms-pki.pko
application/vnd.ms-pki.seccat
application/vnd.ms-pki.stl
application/vnd.ms-powerpoint
application/vnd.ms-powerpoint.12
application/vnd.ms-powerpoint.addin.12
application/vnd.ms-powerpoint.macroEnabled.12
application/vnd.ms-powerpoint.presentation.12
application/vnd.ms-powerpoint.show.12
application/vnd.ms-powerpoint.show.macroEnabled.12
application/vnd.ms-powerpoint.slide.macroEnabled.12
application/vnd.ms-powerpoint.template.12
application/vnd.ms-powerpoint.template.macroEnabled.12
application/vnd.ms-project
application/vnd.ms-visio.viewer
application/vnd.ms-word.document.12
application/vnd.ms-word.document.macroEnabled.12
application/vnd.ms-word.template.12
application/vnd.ms-word.template.macroEnabled.12
application/vnd.ms-works
application/vnd.ms-xpsdocument
application/vnd.oasis.opendocument.presentation
application/vnd.oasis.opendocument.spreadsheet
application/vnd.oasis.opendocument.text
application/vnd.openxmlformats-officedocument.presentationml.slide
application/vnd.rn-realmedia
application/vnd.visio
application/vnd.visio.webdrawing
application/winhlp
application/x-bcpio
application/x-compress
application/x-cpio
application/x-csh
application/x-dvi
application/x-gtar
application/x-gzip
application/x-hdf
application/x-internet-signup
application/x-iphone
application/x-latex
application/x-miva-compiled
application/x-ms-application
application/x-ms-manifest
application/x-ms-reader
application/x-ms-vsto
application/x-ms-wmd
application/x-ms-wmz
application/x-msaccess
application/x-mscardfile
application/x-msclip
application/x-msdownload
application/x-msmediaview
application/x-msmetafile
application/x-msmoney
application/x-mspublisher
application/x-msschedule
application/x-msterminal
application/x-mswrite
application/x-netcdf
application/x-oleobject
application/x-perfmon
application/x-pkcs12
application/x-pkcs7-certificates
application/x-pkcs7-certreqresp
application/x-sh
application/x-shar
application/x-smaf
application/x-stuffit
application/x-sv4cpio
application/x-sv4crc
application/x-tar
application/x-tcl
application/x-tex
application/x-texinfo
application/x-troff
application/x-troff-man
application/x-troff-me
application/x-troff-ms
application/x-ustar
application/x-wais-source
application/x-x509-ca-cert
audio/aiff
audio/basic
audio/mid
audio/mpeg
audio/wav
audio/x-aiff
audio/x-mpegurl
audio/x-ms-wax
audio/x-ms-wma
audio/x-pn-realaudio
audio/x-pn-realaudio-plugin
audio/x-smd
drawing/x-dwf
image/bmp
image/cis-cod
image/gif
image/ief
image/jpeg
image/pjpeg
image/png
image/tiff
image/vnd.wap.wbmp
image/x-cmu-raster
image/x-cmx
image/x-icon
image/x-jg
image/x-portable-anymap
image/x-portable-bitmap
image/x-portable-graymap
image/x-portable-pixmap
image/x-rgb
image/x-xbitmap
image/x-xpixmap
image/x-xwindowdump
text/calendar
text/css
text/dlm
text/h323
text/iuls
text/plain
text/richtext
text/setext
text/tab-separated-values
text/x-ms-iqy
text/x-setext
text/x-vcard
video/mpeg
video/quicktime
video/x-ivf
video/x-la-asf
video/x-ms-wm
video/x-ms-wmp
video/x-ms-wmv
video/x-ms-wmx
video/x-ms-wvx
video/x-msvideo
video/x-sgi-movie
The above solution doesn't show the open, save & cancel dialog. It directly opens the PDF in browser.
ReplyDeleteI think you need to also make an entry in the DOCICon.xml file like:
ReplyDeleteBe sure to add the png file to the images directory.
Hi KansasCoder
DeleteThank you for the comment. No you don't. You need to change the DOCIcon.xml to display the PDF icon. (in SP2013 is there out-of-the-box)
I like your writing style, it was very clear to understanding the concept well; I hope you ll keep your blog as updated.
ReplyDeleteRegards, SAS Course in Chennai
Extracting images from PDF files is not an easy task and one requires the right application to get the job done. There are numerous PDF to Image Conversion software available online and most of them are available free. Adobe CS6 Master Collection
ReplyDeleteThank you very useful java training in chennai struts training in chennai
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteThe main contrast amongst PPT and PPS augmentations is that PPS reports open in "see" mode consequently showing the introduction as a completed slide appear.pdf to ppt
ReplyDeleteThis online pdf merger or pdf combiner or pdf joiner will easily merge pdf files together with use of any software or any registration. pdf merger online
ReplyDeleteGreat Share!
ReplyDeletewarehouse for rent in chennai
Godowns for rent in chennai
Factory shed for rent in chennai
I like the helpful info you provide in your articles. I’ll bookmark your weblog and check again here regularly. I am quite sure I will learn much new stuff right here! Good luck for the next!
ReplyDeleteDot Net Training in Chennai | Dot Net Training in anna nagar | Dot Net Training in omr | Dot Net Training in porur | Dot Net Training in tambaram | Dot Net Training in velachery
ome assets may be exempt, such as your car or household furnishings. Once completed, Chapter 7 releases you from responsibility for all the debts covered in the bankruptcy case. Visit https://srislawyer.com/chapter-7-bankruptcy-lawyer-near-me/ !
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteNice Blog... Thanks for sharing....
ReplyDeleteBest Embedded Training in Chennai| Placement Assurance in Written Agreement
Nice Blog... Thanks for sharing...
ReplyDeleteBest Embedded Training in Chennai| Placement Assurance in Written Agreement