Freigeben über


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 : https://www.adobe.com/support/downloads/detail.jsp?ftpID=4025

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"
    WScript.Echo

end Sub

Sub Main

    if WScript.Arguments.Count < 1 then
                Usage
                wscript.Quit(1)
   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
                Next
    Next

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 : https://support.microsoft.com/kb/2518465
Another article from technet gallery : https://gallery.technet.microsoft.com/Activate-pdf-search-in-cc8bc9bc

Comments

  • Anonymous
    March 10, 2012
    The comment has been removed
  • Anonymous
    March 11, 2012
    Thanks Robert for pointing it out... I made the relevant changes...