SharePoint Blogs / SharePoint University
SharePoint Blogs and SharePoint University - all in one place!
Need SharePoint Training? Attend a SharePoint Bootcamp!

Please delete cookies related to sharepointblogs.com and sharepointu.com to resolve login issues!

PDF Document Type Icon in MOSS
William's Blog

News

  • Disclaimer
    Information in this weblog is provided "AS IS" with no warranties, and confers no rights. This weblog does not represent the thoughts, intentions, plans or strategies of my employer. It is solely my own personal opinion. Inappropriate comments will be deleted at the authors discretion. All code samples are provided "AS IS" without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.

    Creative Commons License
    This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.

MOSS doesn't install an icon for PDF files by default. It simply shows a generic white paper icon.
This is my procedure for fixing this issue:

  1. Download an appropriate icon for pdf document types.
    1. This is the icon from Adobe.
    2. Save to TEMPLATE\IMAGES directory. (DEFAULT: C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\template\images)
  2. Open the file docicon.xml. (DEFAULT: C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\template\xml\docicon.xml)
  3. Add a new Mapping element to the ByExtension element.
    <Mapping Key="pdf" Value="pdficon_small.gif" />
    NOTE: Be sure to change pdficon_small.gif to whatever image you downloaded to represent pdf documents.
  4. Save the edited docicon.xml file.
  5. Restart IIS (iisreset /noforce).

You should now see the PDF icons for all PDF documents in the portal, including search results. 


Posted 08-09-2007 5:54 PM by wpowell

Comments

11 Links Today (2007-08-10) wrote 11 Links Today (2007-08-10)
on 08-10-2007 10:35 AM

Pingback from  11 Links Today (2007-08-10)

wpowell wrote re: PDF Document Type Icon in MOSS
on 08-10-2007 2:26 PM

Same... but different ;)

rtruchon wrote re: PDF Document Type Icon in MOSS
on 12-20-2007 1:29 PM

Great post.  Worked great after I figured out that I had to install it the web server front end not the crawl front end.

Paul K wrote re: PDF Document Type Icon in MOSS
on 02-07-2008 6:06 PM

Thanks. Worked great.

Jason Bradley wrote re: PDF Document Type Icon in MOSS
on 06-04-2008 1:46 PM

I've followed these instructions to the letter, triple checked, as well as similar instructions on other sites and am still seeing the default icon. Any suggestions?

jwebster wrote re: PDF Document Type Icon in MOSS
on 07-03-2008 12:50 PM

Make sure that your case is correct in the XML tag.  My first attempt didn't work due to a lower case 'k'.  Once i changed 'key' to 'Key' everything worked fine.

Alex wrote re: PDF Document Type Icon in MOSS
on 07-10-2008 12:12 AM

Which server  in a farm does this need to be performed on?

William wrote re: PDF Document Type Icon in MOSS
on 07-16-2008 1:07 PM

Hi Alex,

All Web Front-Ends

Robert wrote re: PDF Document Type Icon in MOSS
on 07-31-2008 3:01 PM

Thanks for the time saver :> It worked perfectly

yesh wrote re: PDF Document Type Icon in MOSS
on 08-28-2008 7:49 AM

Hi William,

Can we do this deployment of PDF icon on all servers automatically? I mean is there any feature you are available which does the job of placing the pdf icon file on all servers and making an entry in the respective webconfig files. Please let me know if you are aware of any such feature or method.

Thanks,

Yesh

William wrote re: PDF Document Type Icon in MOSS
on 09-02-2008 7:26 PM

Yesh,

I don't know of anything that exists today (doesn't mean it doesn't, just haven't searched). However, you're right, it would be pretty simple to create a feature/solution that did all this on all WFEs.

Regards,

William

d wrote re: PDF Document Type Icon in MOSS
on 09-19-2008 12:59 PM

thanks! worked perfectly!

Madcap Flare and SharePoint | Microsoft SharePoint & Windows (Vista, Azure, 7) Cloud & Social Computing Space wrote Madcap Flare and SharePoint | Microsoft SharePoint &amp; Windows (Vista, Azure, 7) Cloud &amp; Social Computing Space
on 11-28-2008 3:10 AM

Pingback from  Madcap Flare and SharePoint | Microsoft SharePoint &amp; Windows (Vista, Azure, 7) Cloud &amp; Social Computing Space

opo wrote re: PDF Document Type Icon in MOSS
on 12-03-2008 7:14 PM

Great post... thanks a lot

Mark wrote re: PDF Document Type Icon in MOSS
on 12-10-2008 9:27 PM

Kind of late in the day; however, how does this compare to installing the adobe ifilter ?  Also, does is .pdf search functionality enable in this method ?  Thank you and good day (night).  Regards, Mark

wpowell wrote re: PDF Document Type Icon in MOSS
on 12-10-2008 9:51 PM

Hi Mark,

By default PDF files in SharePoint get a generic icon. The adobe ifilter enables SharePoint to index and crawl PDF documents. However, without the above, the results show the same generic icon.

Basically, this won't enable PDF search, which I think was your second question. This fix simply specifies that pdf files should get a specific image for the icon.

Hope that helps.

William

Filter Central wrote Displaying PDF icons in search results
on 12-17-2008 3:42 PM

I received some questions today on how to display the pdf icons in search results. After you can index

Non-microsoft Files | keyongtech wrote Non-microsoft Files | keyongtech
on 01-18-2009 10:21 AM

Pingback from  Non-microsoft Files | keyongtech

Wut wrote re: PDF Document Type Icon in MOSS
on 02-18-2009 12:51 AM

It's worked !!

At first is not worked yet because of "v"  --> value.

But then "V" --> Value is ok !

Thanks

panoone wrote re: PDF Document Type Icon in MOSS
on 02-18-2009 4:56 PM

That works great for the small icon in document listing. But how do you apply a large icon to the "New" content type drop-down on document libraries?

wpowell wrote re: PDF Document Type Icon in MOSS
on 02-19-2009 1:45 PM

panoone:

Not sure why you would want to do this for a PDF, but I understand what you are asking for.

This one is actually pretty simple.

Let's assume you want to use a PDF as a "New" content type. Simply download the 32x32 large format PDF icon, drop it into the same location, and rename it lg_pdficon_small.gif. You don't need to modify the XML or anything. The magic is simply prefixing 'lg_' to the file name specified in docicon.xml.

Hope that helps,

William

panoone wrote re: PDF Document Type Icon in MOSS
on 03-17-2009 5:36 PM

Ahhhh....genius. Thanks. :)

panoone wrote re: PDF Document Type Icon in MOSS
on 03-17-2009 5:42 PM

My reason for doing this was not PDF-related.

I have a generic content type for all documents that are not one of the Big 3 (Word, Excel or PowerPoint). This is applied to my document libraries as the default content type.

Presently it's large icon uses a Word icon which is confusing for end users. I'd love to hide this from the New menu altogther but then it becomes unavailable at Upload time as well.

If you had a crack for this particular nut I'd be very greatful indeed.

Richard Gardner wrote re: PDF Document Type Icon in MOSS
on 04-16-2009 5:03 PM

BTW...

DO check to ensure that after you copy/download the file  (e.g. pdficon_small.gif) into that directory, that you GO CHECK the NTFS permissions on the file.  

I had sporadic users complain that they were getting prompted on sites they own/contribute - huh?

When I then read they also were complaining of PDF icons not displaying correctly, it kicked in my brain... ohhh...

You must ensure that all permissions inherit from the parent container.  I'm not sure why, but when I checked, it only had the permissions of Administrators, SYSTEM, and the MOSS admin user of the account with which I had logged on and made the change.

wpowell wrote re: PDF Document Type Icon in MOSS
on 04-29-2009 1:26 PM

That actually happens quite frequently. And you are absoutely right, it is coming from the file system so you need to set up NTFS permissions. As an aside, you will see 401 errors in the IIS log for the files that are failing. In your case, you would have seen pdficon_small.gif.

Cheers!

William

Ryan wrote re: PDF Document Type Icon in MOSS
on 05-06-2009 3:40 AM

Such an old problem, this post made my day. When I asked my sharepoint mate about why the icons still haven't be added he mentioned about the Adobe licence and copyrights.

Thanks for your code, Our doc libraries look nicer now =)

Add a Comment

(required)  
(optional)
(required)  
Remember Me?
Need SharePoint Training? Attend a SharePoint Bootcamp!
Posts (c) their respective authors. Everything else (c) 2009 SharePoint Experts, Inc.