Searching PDF files in SharePoint Foundation 2010

SharePoint Foundation has a search scope that is limited to a site collection and also it can search Office client file types such as .doc,. xlsx, .ppt , txt etc. But can we search PDF file types in SharePoint Foundation?? The answer is YES.

Most of the blogs in the internet says we need to use Search Server 2010 Express edition or Licensed version with SharePoint Foundation to do it. Well I am here to say you dont need any other product to be installed with SharePoint Foundation. We can make PDF files searchable by running the following VB script and settings registry keys. But first we need to install PDF Ifilter you will find at :

1. Copy the below content to a VBS file and save it (I.E save file name as AddExtension.vbs)


Sub Usage

    WScript.Echo “Usage:    AddExtension.vbs extension”

end Sub

Sub Main

    if WScript.Arguments.Count < 1 then
   end if

    dim extension
    extension = wscript.arguments(0)

    Set gadmin = WScript.CreateObject(“SPSearch4.GatherMgr.1”, “”)

    For Each application in gadmin.GatherApplications
        For Each project in application.GatherProjects
                    project.Gather.Extensions.Add(extension)  //In place of extension put pdf

End Sub

call Main


2. Copy the above script file to Sharepoint Foundation 2010 Server

3. Run it from Command Prompt
> WScript AddExtension.vbs pdf

4.  Register PDF ifilter as below:
4-1.       Find regkey “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\14.0\Search\Setup\ContentIndexCommon\Filters\Extension\”
4-2.       Right-Click – [New]-[Key]. Then specify key name “.pdf”
4-3.       Right-Click (Default) of above “.pdf” key then click “Modify”
4-5.       Specify value “{E8978DA6-047F-4E3D-9C78-CDBE46041603}”
4-6.       Restart SPSearch4

5. Run crawl as below
>stsadm –o spsearch –action fullcrawlstart

So next time you are asked can we search PDF files in SharePoint Foundation 2010, you will know the answer!! :)

Support Article about the same :
Another article from technet gallery :

Comments (2)

  1. That would just register the file extension, but you would need to install the IFilter for PDF files to actually be able to search within PDF files, otherwise it'd only be able to search for file system attributes such as the file name. You can take the free one from Adobe, but it sucks big time and will kill the crawling performance to the extent of making it unusable. A much better one comes from FoxIt, but it's not free and you have to pay per server license.

  2. Thanks Robert for pointing it out… I made the relevant changes…