Missing PDF icon images in SharePoint 2010

I inherited a SharePoint 2010 environment that had the PDF iFilter installed but was not showing the PDF icon for any of the PDF files.  It took a lot to resolve this issue, which is crazy.  It should’ve been simple.  So I’m writing about my adventures to spare you all from the anguish I faced.  I’ve broken up this message into five sections since it’s long.

1.  The Microsoft KB article does not suffice
2.  SharePoint Sharon’s article has a fatal flaw
3.  Zubair Alexander to the rescue
4.  Double quotes pain
5.  Conclusion

Microsoft KB article
I figured I would just use the Microsoft KB article for installing the PDF iFilter since it also covers setting up the display of the PDF icon.  However, it leaves a lot to be desired.  Namely, the first three bullet points at the end are either vague or inaccurate.   First, I had trouble with “Restart the SharePoint Server Search 14” but another article clued me in on that.  (I have posted the instructions at the end of this article.)  Second, you do not need to reboot the SharePoint servers in the farm for this procedure.  Besides, wouldn’t rebooting the farm thus restart the Search Service thus making Step 1 unnecessary?  Think about it.   And third, there is absolutely no need to create a Test site collection and a document library to see if the PDF icons are working.  It is correct on the fourth item to perform a Full crawl.  That’s one out of four though.  It’s time to blow past this KB article.  <sarcasm>Thanks Microsoft.</sarcasm>

SharePoint Sharon
Going back to my Google results, I found this article which makes several mistakes as well but one stands apart.  First, it gives the correct url to the Adobe website for downloading the icon but then states to download the 17 x 17 icon.  NO!  The good news is that the icon there is 16 x 16, which are the correct dimensions.   Fatal flaw: I copied the code there for the <Mapping> section of the docIcon.xml file but it contains the wrong characters.  (I’ll show you in the double quotes section below.)  It does correctly remind to restart IIS and to perform a Full Crawl but doesn’t mention restarting the Search Service at all.  Simply put, this article doesn’t cut it either.

Zubair to the Rescue
Zubair Alexander offers a very thorough article on this issue.  He offers several registry changes to make/confirm, he explains how to restart the Search service, and he offers several helpful troubleshooting steps.  One minor flaw: he doesn’t provide the link (like the other two articles cited) for getting the 16 x 16 Adobe icon.  He just says in Step 8 to copy it but doesn’t provide for how to get it.  [It’s here, by the way.]  Most importantly, it was his Troubleshooting Step 9 (with the bright red Gotcha! ) that ultimately resolved my problem.

Double-Quotes Pain
I had copied the <Mapping> code directly from SharePoint Sharon’s site.  Upon very close inspection, sure enough, it contained the wrong double-quotes.  Painful.  See below and look very closely.  The double quotes in the section for pdf are different than the quotes in the other sections.

docIcon.xml with INCORRECT double quotes

docIcon.xml with INCORRECT double quotes

So I deleted the double quotes you see above and replaced them with “correct” double quotes and voila – my SharePoint 2010 farm now correctly shows the PDF icon next to PDF documents.  Success!

docIcon.xml with the CORRECT double quotes

docIcon.xml with the CORRECT double quotes

Conclusion
The process, therefore, for setting up the Adobe iFilter for 64-bit on SharePoint 2010 is thus:

  1.  Install PDF iFilter 9.0 (64 bit) from http://www.adobe.com/support/downloads/detail.jsp?ftpID=4025
  2. Download the 16 x 16 PDF icon from the Adobe web site http://www.adobe.com/misc/linking.html  or just right-click and Save this one:  pdf_icon   Then, copy it to C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\IMAGES\
  3. Add the following entry in docIcon.xml file, which can be found at: C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\XML   [You may need to change the name of the .gif in the code below to match your exact file name.]
    <Mapping Key=”pdf” Value=”pdf_icon.gif” />
  4. Add pdf file type to Search.  Go into the Search Service Application, File Types page (found on the left-hand navigation) and add the pdf file type.
  5. Add pdf file type to the registry.  Navigate to the following location in regedit: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office Server\14.0\Search\Setup\ContentIndexCommon\Filters\Extension
  6. Right-click > Click New > Key to create a new key for .pdf
  7. Add the following GUID for the default value:
    {E8978DA6-047F-4E3D-9C78-CDBE46041603}
  8. Open a command prompt as Administrator.  We need to restart SharePoint search services.   Type the following lines, one at a time:
    net stop osearch14
    net start osearch14
  9. We now need to restart IIS.  In the command prompt window, simply type:
    iisreset
  10. Now, open Central Administration in SharePoint 2010, go to the Search Service Application, and perform a Full Crawl.

The Adobe PDF icon should now appear next to all PDFs.  If they do not, consider going back to Zubair’s site for his troubleshooting steps.  But first of all, make sure you have the correct double quotes in docIcon.xml.  That caused me a lot of grief and I want to make sure no one else struggles with it.