Subscribe:      
 

How to add PDF icons next to PDF documents in a SharePoint Library

Written By: Rob Fisch -- 8/19/2010 -- join -- contribute -- (18) comments -- printer friendly version

Rating: Rate --

Categories: Configurations, Design, IIS, MOSS 2007, WSS3

Problem

By default, SharePoint document libraries display graphical icons representing various Microsoft Office Applications (i.e. Excel, Word, etc.). All non-Microsoft documents are represented with a plain white square. How do I display a special icon for other document types?

Solution

There are 3 simple steps to adding graphical icons for non-Microsoft documents. These are to 1) add a graphic, 2) add a mapping to that graphic so SharePoint knows where to look for it and 3) restart the web service (IIS).

Below are instructions on how to add a graphic for PDFs. You can use this technique for other document types as well.


Note: These instructions make the following assumptions:

  • The default location of your servers "Program Files" folder as "C:\Program Files". If that is not the case, adjust the instructions as needed.
  • You are using WSS3 or MOSS2007.

  1. Create or download a small (approx. 17 x 17) icon that represents PDF documents.

    Save the file to:

    C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\template\images

  2. Find a file called docicon.xml in this location:

    C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\template\xml\docicon.xml

    Save a copy as a backup, then open it with a text editor (i.e. notepad)

  3. Add a new Mapping element to the "ByExtension" element as follows:

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

  4. Save the edited docicon.xml file.

  5. Restart IIS (iisreset /noforce).

Next Steps




Learn more about SharePoint



Sponsor Information




Copyright (c) 2010-2017 Edgewood Solutions, LLC All rights reserved
privacy | disclaimer | copyright | advertise | contribute | feedback | about
Some names and products listed are the registered trademarks of their respective owners.


MSSharePointTips.com | MSSQLTips.com