SharePoint 2013 Search PDF Result Type with Previw in Browser

Friday, December 14, 2012

Search is the one of the most improved Feature that i found in SharePoint 2013. It’s Not only in Architecture or functionality. Even that Microsoft Improved Search User experience allot in SharePoint 2013. Now UI is more Informative and User Friendly. By Playing with SharePoint 2013 Search that t I Notice in SharePoint 2013 its Search quit Preview window. Where you can see immediately Preview the Search Result Items in Browser like Word Document. You don’t need to open them in any client app. To check is the same document that your look for. By just putting mouse over on the search result item it will give very nice small Hover Panel on right side of Search Results. Where you can see preview of your word,excel,powerpoint,html items and you can scroll down the document’s. it’s a Cool Feature and time saving. Another most important and requested feature for SharePoint 2013 Search to Provide PDF Search indexing by default OOB. So not need of IFilters for PDF Search. 

I was playing with SP15 Search then I notice SharePoint 2013 Search will not show me the PDF Documents in Preview mode Like documents word or excel. 

Then I jump into and try to some customized little bit. In SharePoint 2013 Search there is another very cool Feature in Search it’s called "Result Types" By default there is so many Result Types are there in your siteCollection and  you  can also create new by copying any existing one of the modified and create from scratch. To modified html and js files to display custom content in Preview window you need you find Display Templates under SPD2013 . Here i am trying to modify existing Result Types to Open Pdf in hover panel and display in Browser.


Open SharePoint Designer 2013 and open Site where you want this modification to be done. then navigate 
to All File>_catalogs>masterPage>Display templates>Search.

Find Item called   " item_PDF_HoverPanel.html " and right Click on Edit.

find Item
 then navigate the  Tag Div with ID  id="_#= $htmlEncode(id + HP.ids.content) =#_" data-displaytemplate="PDFHoverPanel". in Side this Tag just Past the Following Code. and save.

Refresh the Search Results and Mouse over again on PDF Item. if you will not find the Preview window so kindly install PDF plugin in your Browser 

By Usama Wahab Khan Happy SharePointing :)

Reference :


share this post
Share to Facebook Share to Twitter Share to Google+ Share to Stumble Upon Share to Evernote Share to Blogger Share to Email Share to Yahoo Messenger More...