Grounding.co.za

Technology information for IT specialists
Welcome to Grounding.co.za Sign in | Join | Help
in Search

Neil's IW Space

Information Worker Blog's by Neil van Wyngaard

December 2008 - Posts

  • Working with PDF's and Sharepoint

    Most of us are used to working with Sharepoint using Office 2007 and we are all quite familiar with it by now, but it is fairly obvious that PDF documents have been used for many years and we all love using them. It is therefore inevitable that we will end up putting them and using them in Sharepoint at some point or another.

    The only problem is that Microsoft does not support this file format in any of it's UI interfaces even though it can be uploaded to a document library due to the fact that it is a binary file. The purpose behind this blog therefore is to show you how to improve the user experience using PDF files in the following areas:

    • Indexing and searching PDF documents using Sharepoint Search.
    • Creating  a PDF icon on Sharepoint that is displayed in the user interface.
    • Installing the PDF add-on for Office 2007 that allows you to save PDF files directly from Office 2007.

    Installing the PDF I-filter for Sharepoint Search

    To understand why you need to do this, it is probably a good idea to explain how Sharepoint Search works in a bit more detail. I am going to assume that you are running the Enterprise edition of MOSS 2007 without restrictions when outlining the next section.

    The search engine in Sharepoint can do the following:

    • Index all the meta data inside lists and document libraries within Sharepoint.
    • Index the actual content inside the documents stored in Sharepoint
    • Index external locations outside Sharepoint like file shares, Exchange Public folders and even databases.
    • Index the content inside documents located on these external locations.

    It is like having your own private Search engine on your network just like you would search on the Internet. The problems start coming in with the ability of the Search engine to index the content inside documents. This is done via an IIS extension called I-filters and they need to be installed on the Sharepoint server where the Search engine is configured.

    Fortunately Microsoft Automatically provides I-Filters for most of their file formats when Sharepoint is installed. These would include *.docx, *.doc, *.xlsx, *.xls etc. etc. Unfortunately and for obvious reasons this does not include *.pdf.

    This problem can be resolve in a two ways:

    These two actions will automatically install the PDF I-filer onto the Sharepoint server and allow the "Search Service" to index the content inside the PDF documents. The searching will now be just as effective as with Office 2007 documents.

    Creating the PDF Icon in Sharepoint

    Creating the PDF Icon in Sharepoint is a bit more tricky and also involves direct access to the 12 hive. The first step is to navigate to the 12 hive on the Sharepoint server and finding the correct folders to work with.

    12 Hive Location

    Under the "Templates" folder in the 12 hive you will find another folder called images. Paste the image file into this directory that will be utilized to represent the PDF icon in Sharepoint. This file can be in any number of formats such as JPEG, GIF, PNG and many more.

    pdf

    The trick is to size the image before the time to make sure that it is about the same size as an icon. There are many places on the Internet where you can go and find a file, but I will put the one I used in this blog if you want to use it.

    PDF gif

    Now that the image file is in place, we need to tell Sharepoint to use it by editing a specific XML file located in the "XML" folder under the "Templates" folder in the 12 hive. The file is called "DOCICON.XML" and can be edited in any text editor like "Notepad".

    DocIcon file

    Inside the XML file you will find a section called "<ByExtension>". Navigate to the end of this section and copy the last line before the closing tag.

    XML setting

    Paste this line as a new line at the end of the section and change it to refer to the new PDF image that you copied earlier. Save the file and do an "IISReset" to see the changes. Your PDF icons should now appear next to all the PDF documents that you uploaded previously.

    Installing the PDF Add-on for Office 2007

    When MS initially create MS Office 2007 it included the ability to save any Office document as a PDF file by purely using the "Save As" ability of MS Office. Just before the release to the public they removed this feature due to potential law suites and disgruntled "Open Source" people.

    Fortunately it is not illegal to make it available as a free download and allow people to choose to use it or not, without forcing them to have it in the first place. Therefore the only thing left to do is download and install it from the link below.

    2007 Microsoft Office Add-in: Microsoft Save as PDF or XPS

    Save As PDF

    Once the add-in is installed it is a simple matter of opening up any document in any MS Office 2007 application and selecting "Save As" from the menu.

    I hope this blog makes you life working with PDF's and Sharepoint a bit easier. Let me know about your experiences by posting comments to this blog.

    Downloads:

    2007 Microsoft Office Add-in: Microsoft Save as PDF or XPS

    Adobe Reader Download

    http://ifilter.org/Links.htm

    Referenced Articles and Blogs:

    http://support.microsoft.com/kb/837849

    Related Blogs:

    Open XML SDK announced

    Basic steps on Implementing "Search" in Sharepoint

    Comparing MS Office versions with Sharepoint

    SharePoint - Get to know the directory structure in the 12 Hive

More Posts
Add to Technorati Favorites
Powered by Community Server (Commercial Edition), by Telligent Systems
Afrigator