Friday, May 14, 2010

Adding PDF icon in SharePoint 2007

Hi all, 

In one of the projects, I had to display PDF icon whenever users uplaods a PDF file.Apparently, no coding efforts needed to achieve this.

PART 1: Central Administration 

i) Go to Central Administration > Shared Services > Search Settings > File Types >Add File Type.
ii) Enter ‘pdf’ as a file extension and save.
iii) Perform the full index crawl. 

PART 2: Images and XML

i) IMAGES: Go to C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\IMAGES and copy the PDF icon (from internet) and name it pdfIcon.gif. 

ii) C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\XML and open the file in notepad. 

iii) Add a new entry under <ByExtension>
<Mapping Key="pdf" Value="pdfIcon.gif" />
and that's it.  

Please note we can do it only on development environment and/or test server.  If on production server does not have PDF logo, we need to contact SharePoint administrators or the infrastructure team. 


No comments:

How to: Use cascading drop-down lists in PowerApps

Hi all, Using cascading dropdown, users can easily fill the forms by selecting drop-down values dependent on values from another dro...