Posts Tagged ‘PDF’

The other day, I was asked to debug the “Tagged Items” web part within SharePoint 2010. You can see this web part in action when clicking on a tag, in someones profile page. The link then takes you to tagprofile.aspx page, and shows you(by default) 60 days worth of tagging of the specfied tag / keyword.

The problem was PDF icons didn’t didn’t seem to work correctly. The first thing that came to mind was the DocIcon.xml, which I knew by default doesn’t have any entry’s for PDF Documents. So I went ahead and added this line to the DocIcon.xml :  <Mapping Key=”pdf” Value=”pdficon.gif”/>

Then I reset IIS and as expected in document library’s, I now showed a PDF Icon instead of the blank / default icon. However when I clicked the tag it still showed the red x next to the document title. I thought for a second, and then remembered that when SharePoint needs the larger icon, for a specified extension, it will append ”lg_” to whatever is listed in the DocIcon.xml. In my example this file name would be “lg_pdficon.gif”. Since I did not place the larger size icon file in the /images folder, this icon would not render. One I did, it rendered correctly.

The moral of the story is make sure you name your PDF file with a standard name ex: “pdficon.gif” this way SharePoint will be easily be able to reference the large icon by “lg_pdficon.gif” . The main reason for calling out the standized naming convention is because many of the PDF document walk thoughs on the internet use pdficon_small.gif as the name. Which when you add “lg_pdficon_small.gif ” seems a bit weird to me…

Notes**

The small icon should be 16×16 and the large should be 32×32.

Adobe Linking site. ( all the PDF icons you will every need… ) : http://www.adobe.com/misc/linking.html

More information about DocIcon.xml : http://msdn.microsoft.com/en-us/library/ms463701.aspx

Let me know if you have any troubles. Thanks!!

Thanks http://support.microsoft.com/kb/2293357

  1. Install PDF iFilter 9.0 (64 bit) from http://www.adobe.com/support/downloads/detail.jsp?ftpID=4025 (http://www.adobe.com/support/downloads/detail.jsp?ftpID=4025)
  2. Download PDF icon picture from Adobe web site http://www.adobe.com/misc/linking.html (http://www.adobe.com/misc/linking.html) and copied at C:Program FilesCommon FilesMicrosoft SharedWeb Server Extensions14TEMPLATEIMAGES
  3. Add the following entry in docIcon.xml file, which can be found at: C:Program FilesCommon FilesMicrosoft SharedWeb Server Extensions14TEMPLATEXML
    <Mapping Key=”pdf” Value=”pdf16.gif” />
  4. Add pdf file type on the File Type page under Search Service Application
  5. Open regedit
  6. Navigate to the following location:
    HKEY_LOCAL_MACHINESOFTWAREMicrosoftOffice Server14.0SearchSetupContentIndexCommonFiltersExtension
  7. Right-click > Click New > Key to create a new key for .pdf
  8. Add the following GUID in the default value
    {E8978DA6-047F-4E3D-9C78-CDBE46041603}
    • Name: Extension
      Type: REG_SZ
      Data: pdf
    • Name: FileTypeBucket
      Type: REG_DWORD
      Data: 0×00000001 (1)
    • Name: MimeTypes
      Type: REG_SZ
      Data: application/pdf
  • Restart the SharePoint Server Search 14
  • Reboot the SharePoint servers in Farm
  • Create a Test site (with any out-of-box site template) and create a document library upload any sample PDF document(s).
  • Perform FULL Crawl to get search result.

**FAST Search Info**

By default fast search will index inside of pdf’s, however this would may be necessary to edit/ add this if using a third party IFliter.

Edit this file :

C:FASTSearchetcconfig_dataDocumentProcessorformatdetectoruser_converter_rules.xml

Add this :

<ConverterRules>
<IFilter>
<trust>
<ext name=”.pdf” mimetype=”application/pdf” />
</trust>
</IFilter>
<MimeMapping>
<mime type=”application/pdf”>PDF File</mime>
</MimeMapping>
</ConverterRules>

Run psctrl reset to reset all currently running item processors in the system.

Posted by IsaacBlum at 29 October 2009

Category: Business, For The Greater Good, Free Help, Microsoft, MOSS 2007, SharePoint, WSS 3.0

Tags: , , , , , , ,

Out of the box neither WSS 3 nor MOSS 2007 will index content located in Acrobat PDF files, so you need to set up the IFilter.  I’ve also found that that PDF files loaded prior to the installation of the filter won’t be re-crawled automatically, so to be on the safe side you might want to kick off a full crawl.

Here is what I’ve found works for WSS 3.0:

  1. First, you need to download the Adobe PDF IFilter 6.0, which you can find at this URL.  You should also get hold of a suitable Icon to use with PDFs, so that when they are listed in a document library they are easily recognisable.  There is a 17 x 17 one available on the Adobe web site here.
  2. Once you’ve downloaded the IFilter, install it on your WSS 3.0 server, and then follow the instructions on registry settings in Microsoft KB Article 927675.  I’ve always found that providing the Adobe IFilter installed properly, the only setting I need to add is the Search Extensions one listed in step 2.  Also note step 5 re stopping and re-starting the search service.
  3. Now you need to set up the Icon file.  If you downloaded the icon file in step 1 above, you will have a file called pdficon_small.gif.  You need to copy this onto your WSS 3.0 server, into drive:Program FilesCommon FIlesMicrosoft SharedWeb Server extensions12TEMPLATEIMAGES.
  4. Next you need to edit the XML file which WSS uses to link file extensions to icons.  This file is called DOCICON.XML and is located at drive:Program FilesCommon FIlesMicrosoft SharedWeb Server extensions12TEMPLATEXML.  Navigate to that folder and locate the file.  I would suggest making a backup copy first, then opening the file in NotePad.  You need to add a mapping key for PDFs at the bottom of the file, above the </ByExtension> closing tag.  The new key will be <Mapping Key=”pdf” Value=”pdficon_small.gif” OpenControl=”"/>  (note that XML is case sensitive so make sure you use same case as previous entries).  Then save the file.
  5. That’s pretty much it, but if you already have PDFs uploaded to your WSS server I would recommend starting a full crawl.  You can do the with STSAdm, the command syntax is Stsadm -o spsearch -action fullcrawlstart .  More on this on TechNet here.
  • Archives

  • Tags

  • Subscribe
  • Pages

  • More

  • Disclaimer…

    This is my personal weblog. The opinions expressed herein are my own and are not representative of any 3rd party influence. The owner of this blog reserves the right to edit or delete any comments submitted to this blog without notice if they are deemed to be spam, offensive or otherwise inappropriate. The owner of this blog makes no representations as to the accuracy or completeness of any information on this site or found by following any link on this site. The owner will not be liable for any errors or omissions in this information nor for the availability of this information. The owner will not be liable for any losses, injuries, or damages from the display or use of this information.


    Lastly, I do my best to document my sources if the article is not of my own creation. If I have missed or forgotten to source your work. I would love feedback via the comments section. Thank you.

DreamHost promos
SiteLock