.NET life

HUGON Jérôme
Microsoft Certified Technology Specialist Microsoft Certified Application Developer Microsoft Certified Professional

Add icons to document types

SharePoint 2010

Category SharePoint 2010  | Publication Date : 3/18/2011

When you add a document of unknown type for SharePoint, a neutral document icon appears in the document librairie near the file. Here is the example for a PDF File:

SharePoint 2010 - file type 1

 

To display a PDF icon as on Windows, the first step is to download the wished picture from Google image for example with a size of 16 x 16 pixels. Store this picture in the folder C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\IMAGES on the server.

 

To reference the picture with the PDF extension, open the file DOCICON.XML located in the folder C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\XML. Into the section ByExtension, add a line like below:

<Mapping Key="pdf" Value="pdf16.gif" />

pdf16.gif should be replaced by the name of your picture previously downloaded.

 

Restart IIS with the command iisreset.

 

When reloading the document librairie, the new icon appears:

SharePoint 2010 - file type 2


Related articles

Install the PDF iFilter

SharePoint 2010

Category SharePoint 2010  | Publication Date : 3/18/2011