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" />
 
iv) IISRESET 
 
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. 

Cheers, 
--aaroh

No comments:

Low Code Reimagined with AI + Copilot Pitch Deck - Copy Copilot day (Virtual) - 2023

 Hi All,  I presneded a session at Pune UG on Low Code Reimagined with AI + Copilot Pitch Deck.  Video is at this address  https://www.youtu...