Monday, October 02, 2006

Mapping icons for documents in SharePoint document library

As a sharepoint developer, I have come across this small issue which is to have an image for the 'pdf's in the document library. As default, pdf file's image icon is not mapped with a 'pdf icon' image file, but we can do this manually.

Browse to the folder,

%SystemDrive%:\Program Files\Common Files\Microsoft Shared\web server extensions\60

First Step:
under IMAGES folder, insert the pdf icon file (basically a GIF file with 16 x 16 pixels to look consistent)

Second Step:
under XML folder, open DOCICON.XML xml file.
Insert another mapping element with variables key="pdf" and Value="pdf.gif" as shown below.

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

Key is the document's extension and Value is the name of the image file.

This will simply solve the icon problem and the best thing is you can have any icon for any file type.

Try and enjoy :)

Cheers!

No comments: