One problem you may be facing if you are new to SharePoint 2010 is how to open PDF files. There are a couple different problems you may have noticed. One: the PDF files do not show a file type icon like the Word or Excel files do, and Two: when you click on a PDF file to open it, you are presented with a dialog box asking you to Save or Cancel.
By default, SharePoint does not recognize PDF files, so we will have to tell it how to recognize the files to display the pretty icon.
The reason the PDF does not open is because of a new header called X-Download-Options that is passed into your browser and if you are using IE 8, a new security feature will block the file from opening.
While we are setting up PDF files, lets go ahead and configure SharePoint’s search engine so that it can crawl the contents of PDF files as well.
First, let’s tackle the easiest to fix issue. A SharePoint web application has two modes that it uses to handle browser files: Permissive and Strict. The default mode is Strict and will cause SharePoint to send the X-Download-Options header.
To turn off the header:
- Open your SharePoint Central Administration.
- Click on “Manage web applications.”
- Click on “SharePoint – 80.”
- In the ribbon at the top of the page, click “General Settings.”
- Scroll down the pop up window until you find “Browser file handling” and change the selected value from “Strict” to “Permissive.”
- Click OK to save changes.
Setting Up The Search Engine To Crawl PDFs
- Download Adobe PDF iFilter 9 for 64 bit platforms from Adobe.
- Install iFilter on your SharePoint server (or the server that is running the search service).
- Accept all defaults.
Showing the PDF Icon
- Visit Adobe’s site to download an image of their PDF icon. Save a copy of the 17 x 17 image size to C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\IMAGES\ on your SharePoint server.
- Edit the C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\XML\DOCICON.XML file on your SharePoint server.
- Scroll down to the <ByExtension> tag and enter the following between the <ByExtension> and </ByExtension> tags:
<Mapping Key=”pdf” Value=”pdficon_small.gif” OpenControl=”” />
* If you want to keep the file organized, check the other keys and enter it in alphabetical order.
- Save the XML file.
- Next, open the SharePoint Central Administration site.
- Under “Application Management”, click “Manage service applications.”
- Scroll down the list of applications and click on “Search service application.”
- In the left-hand menu, click “File types.”
- Click “New file type.”
- Enter “pdf” into the “File extension” box and click OK.
- Now, you should be able to scroll down and find your PDF icon.
Now, we’ll need to restart IIS by opening the command prompt on your SharePoint server as Administrator. Type into the command prompt: “iisreset” and IIS will be stopped and restarted.
Running A Full Crawl
- From the Central Administration, under “Application Management”, click on “Manage service applications.”
- Scroll down and click on “Search service application.”
- From the left-hand menu, click “Content Sources.”
- Hover your mouse over the “Local SharePoint sites” record and click the down arrow for more options.
- Select “Start full crawl”
Now, you should be able to open PDF files, see adobe icons next to them in library web parts, and be able to search the contents using SharePoint’s search engine.