The Old Joining Dots Blog

Please note this site has been retired and is no longer updated.
Please visit the new blog at www.joiningdots.com/blog/

09 May 2007

SharePoint 2007 and Adobe PDF

[Entire Post reviewed and updated: 17/03/09 to include infrastructure update, 64-bit and farm installation notes]

If you are deploying Microsoft Office SharePoint Server (MOSS) 2007, even if you are planning a vanilla deployment (i.e. no bespoke development, using only out-of-the-box features) there is one piece of bespoke configuration you will likely still want - the ability to index and search for Adobe PDF files.

There is a great post over on SharePoint blogs, written by S.S.Ahmed, detailing how to add PDF support to your MOSS box. However, Adobe have made some changes to their use of iFilters and there is now a shorter and easier way that doesn't require registry edits or resetting your web server.

The following process works on my demo build for Microsoft Office SharePoint Server 2007 and has been repeated for numerous clients with various different SharePoint deployments. Default names and file locations have been used here - e.g. SharedServices1. I named the PDF icon as 'pdficon.gif'. If you have used different names and locations, substitute as necessary.

  1. Download and install Adobe Acrobat Reader 7 or later on the server to be used for indexing. (Note: From version 7 onwards, the reader includes the iFilter by default, previously you had to install the iFilter separately). If you have a 64-bit environment, you will need to download the 64-bit version. See notes at the end of these instructions.
  2. Download the PDF icon (select 'small 17 x 17') from http://www.adobe.com/misc/linking.html
    1. Give the icon a name (I use pdficon.gif)
    2. Save the icon in c:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\IMAGES
  3. Edit the Docicon.xml file to include the PDF icon
    1. Navigate to c:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\XML
    2. Open the DOCICON.XML file in Notepad (or an XML editor). You should see that the file has two main tags - ByProgID and ByExtension
    3. Within the ByExtension tag, add an entry for the PDF icon 'Mapping Key="pdf" Value="pdficon.gif" /' (replace the single quotes with angle brackets)
    4. Save and close the file
  4. Stop and restart Internet Information Server (IIS). Note: This will temporarily take SharePoint offline. Open a command line (Start - Run - and enter 'cmd') and type 'iisreset'
  5. Repeat steps 3 and 4 for any SharePoint web front-end servers (Note: You only need to install the iFilter on the indexing server but for the icons to appear they need to be added to all web front-ends)
  6. Add the PDF file type to your search index (note that this has to be completed for each index, i.e. each Shared Service)
    1. Open your Search Settings: SharePoint 3.0 Central Administration - SharedServices1 - Search Settings (Note: If you have installed the Infrastructure Update, you will see the option in the side bar under both Search Settings and the new Search Administration dashboard)
    2. Select File Types
    3. Click Add File Type
    4. Enter pdf in the text box (labelled File extension) and click OK
    5. Check that the pdf file type is listed and has the pdf icon showing next to it. If the icon isn't showing, something has gone wrong. Review all of the above steps. Most common problems are spelling mistakes in the docicon.xml file and not repeating the process on all SharePoint web front-ends.
  7. Perform a full crawl of your content sources - PDFs will not show in search results until a full crawl has completed and indexed the PDFs using the iFilter you just installed.

That's all there is to it. Check that everything is working by doing a search for a file you know is a PDF document. The document should be listed in the results and should have the PDF icon displayed next to it.

If you have installed SharePoint on 64-bit servers, you will need to use the 64-bit filter. It can be downloaded from http://labs.adobe.com/wiki/index.php/PDF_iFilter_8_-_64-bit_Support. Please do not follow the instructions provided by Adobe with the filter. They include modifying the registry (not necessary - you should add file types using SharePoint's administration pages, not by modifying the registry). Also, the icon does not appear to get installed automatically and still needs to be added using the instructions outlined above.

Again, thanks to S.S.Ahmed for writing the original 'how to' that this post is based on.

Technorati tags: SharePoint, SharePoint 2007, MOSS 2007