This is something we do as a part of every SharePoint Server 2010 install – we have been unable to find any reliable instructions on how to do this, and this works for us every time.
Follow the steps below to install and configure PDF iFilter on SharePoint Server 2010:
- Install PDF iFilter 9.0 (64 bit) from here.
Download the following PDF icon file:
|Right click and “Save As”|
And save it to C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\IMAGES\
Next you need to edit your docIcon.xml file so that PDF files will use that icon. Navigate to
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\XML\docIcon.xml
and add the following line:
|<Mapping Key=”pdf” Value=”pdf16.gif” OpenControl=““ />|
**Adding the OpenControl=”” option at the end of this line fixes a problem with SharePoint prompting you to open a PDF as Read-Only or Edit – thanks to David Kvas for his post on this!
A couple of things to note:
- Be careful you don’t introduce rogue ascii characters (don’t copy and paste from the web page into the file without making sure the formatting has been removed). A good safe bet is to simply copy a similar line from where you plan to put the new line and make your changes that way.
Also, because this is an XML file, don’t just plunk this line at the top or the bottom of the file, it needs to go in the <ByExtension></ByExtension> section. Again, a good idea would be simply to find that section, and work your way down the list (it’s alphabetical) and insert the line in its proper order. That way you can be sure you haven’t put it outside of its XML tags – which can cause all kinds of issues (Application broken because of an extra character in your code that you can’t see no matter how hard you look? *raises hand*)
* Note: If the file is locked and you’re unable to save your changes, perform a quick IISRESET to take care of that – be careful not to interrupt your users.
Next, open the registry and navigate to the following location:
Right-click Extension, then click New – Key:
Name the Key .pdf
Now add the following GUID in the default value as shown in the figure below.
Open SharePoint Central Admin, and click on Manage Service Applications
Click on your Search Service Application:
Select File Types from the Crawling Menu on the left:
Select New File Type:
And type pdf into the File extension box, and click OK:
Once you click OK, it will take you back to the previous screen where you will now see the PDF file type showing up with the icon that you specified earlier in the first phase of this process:
* Note: if the icon doesn’t show up immediately, you’ll need to do an IISRESET to reflect the changes you made to the docIcon.xml
Then restart the SharePoint Server Search 14 service as shown in the figure below:
(Start-Run-services.msc, in case you forgot)
Finally, perform a fresh crawl of your site(s) to update the index and start showing PDFs – a full crawl is ideal, but if server resources are a concern, perform an incremental crawl at the very least.
To get a crawl running, go back into SharePoint Admin, and click on Content Sources under Crawling:
Selecting Start all crawls from this menu will perform a full crawl on all content sources:
If you want to run an incremental crawl (or a full on specific sites) select that site’s drop down menu and choose Start Full Crawl or Start Incremental Crawl. Note that if you have chosen to run an incremental crawl because of time constraints or server load, you’ll need to select each site in your list and start an incremental crawl from the drop-down menu.