Search Server is Not Necessary to Crawl PDF files in SharePoint Foundation 2010
A lot of blogs and articles on the Internet indicate that in order to crawl PDF documents in SharePoint Foundation 2010 you must install Microsoft Search Server. I want to clear this myth by stating that according to Microsoft, Search Server is not required to crawl PDF files in SharePoint Foundation 2010.
The main problem that people run into is the fact that, unlike WSS 3.0, SharePoint Foundation 2010 does not have an interface to add file extensions for additional file types and iFilters. So how can you crawl additional file types, such as PDFs, in SharePoint Foundation 2010? One easy solution is to use the following VB script. The VB script is available in the KB article 2518465. Here’s the step-by-step procedure.
- Copy the following content to notepad and save the file with a .vbs extension. For example, AddExtension.vbs.Sub UsageSub Usage
WScript.Echo “Usage: AddExtension.vbs extension”
if WScript.Arguments.Count < 1 then
extension = wscript.arguments(0)
Set gadmin = WScript.CreateObject(“SPSearch4.GatherMgr.1”, “”)
For Each application in gadmin.GatherApplications
For Each project in application.GatherProjects
- Copy the script to SharePoint Foundation Server and run it at the command prompt. This will add the PDF extension.
> WScript AddExtension.vbs pdf
- Register the PDF iFilter by going to the following registry key.
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\14.0\Search\Setup\ContentIndexCommon\Filters\Extension\.
- Right-click the Extensions folder and select New, key.
- Enter .pdf for the key name.
- In the right-hand pane dobule-click the Default value and enter the following for the Value data:
- Restart SPSearch4 by typing the following at the command prompt:
net stop spsearch4
net start spsearch4
- Run crawl by typing the following at the command prompt:
>stsadm –o spsearch –action fullcrawlstart
The stsadm.exe utility is located in the “14 Hive” folder at C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\BIN.
- You should now be able to crawl PDF files in SharePoint Foundation 2010.
Note that this method adds the PDF extension. You can use the same technique to add additional filters as necessary.