SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I added the following line in the DOCICON.XML file and I get the PDF icon in my document lists, but not in Announcement lists that have a file attached or uploaded as a PDF.

<Mapping Key="pdf" Value="icpdf.png" OpenControl=""/>

PDF attached in announcement list

enter image description here

PDF in Document Library

enter image description here

I am using SharePoint 2010 Standard.

share|improve this question

The path to the icon is inserted at the time you created the post and unfortunately it is not dynamic. You have to edit the posts prior to adding the PDF icon and update the path to the proper icon image file. All new post after the PDF icon was added will show correctly.

share|improve this answer

SharePoint doesn't show icons for attachments. Are you doing something to force it to via SharePoint Designer?

share|improve this answer
I forgot to mention that this is in SharePoint 2010. Screenshot This is out of the box. – Rick Dec 14 '12 at 15:55
Ooo, I thought you were attaching to the item. I tested it out on mine as well and it works: The path to my image is /_layouts/images/icpdf.png. This is odd since you can see it in the doc library... When did you apply the docicon.xml settings? – David Lozzi Dec 14 '12 at 16:00
I did this a couple of days ago and have reset the IIS a couple times since then. BTW, the image doesn't end in PDF it actually does. I just edited the image and accidently left it out. – Rick Dec 14 '12 at 16:04
what do you mean by "BTW, the image doesn't end in PDF it actually does. I just edited the image and accidently left it out." – David Lozzi Dec 14 '12 at 16:06
I added screenshots of the list and library examples. – Rick Dec 17 '12 at 11:57

Did you restart IIS?

in cmd , type "iisreset"

for my sharepoint, file is "pdf16.gif" and with resolution 16x16 code is here :

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

try to replace png with gif.maybe it works.

share|improve this answer
It didn't affect the announcement list but made my document lists worse as it showed the broken image. – Rick Dec 17 '12 at 11:53
To clarify, the Value="xxx.gif" should be the actual image name you're using. behrouz's image is named differently than yours. – David Lozzi Dec 17 '12 at 14:31
Obviously, I only changed .png to gif. and restarted the IIS and the ourcome in the anouncment list PDF attachment was the same as I have updated my original question and the document PDF item had a broken image. – Rick Dec 17 '12 at 15:26
you mean you only changed .png to .gif not convert ? you should convert Png to Gif not changing name of file format, but if you converted then i have no idea for solution. – behrouz Dec 17 '12 at 15:46
Well, I converted the 16x16 image from jpg to gif, updated the DOCICON.XML file to reflect the new file and reset the IIS and got the same result as my original post. – Rick Dec 18 '12 at 13:43

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.