HOW TO ENABLE PDF PREVIEW IN OFFICE WEB APPS/SHAREPOINT 2013

Posted on

Enabling PDF Preview is a must in today’s environments.  We have used Sharepoint 2013 for over 1 year and we didnt have this feature, we never thought it could be possible because well, the name is called “Office Web Apps”, but indeed is possible and straightforward.

Please note the solution below only works if you have office web apps, March 213 PU.

 

SOLUTION

1. Execute the following script.

2. Dont forget to run a full crawl afterwards


$tenantOwner = Get-SPEnterpriseSearchOwner -Level SSA $ssa = "Search Service Application" #change if you have a different name $rule = get-SPEnterpriseSearchPropertyRule -PropertyName "FileType" -Operator "IsEqual" $rule.AddValue("pdf") $ruleCollection = Get-SPEnterpriseSearchPropertyRuleCollection $ruleCollection.Add($rule) $item = new-SPEnterpriseSearchResultItemType -Owner $tenantOwner -SearchApplication$ssa -Name "PDF with Preview" -Rules $ruleCollection -RulePriority 1 -DisplayProperties "Title,Author,Size,Path,Description,EditorOWSUSER,LastModifiedTime,CollapsingStatus,DocId,HitHighlightedSummary,HitHighlightedProperties,FileExtension,ViewsLifeTime,P arentLink,ViewsRecent,FileType,IsContainer,SecondaryFileExtension,DisplayAuthor,docaclmeta,ServerRedirectedURL,SectionNames,SectionIndexes,ServerRedirectedEmbedURL,S erverRedirectedPreviewURL" -DisplayTemplateUrl "~sitecollection/_catalogs/masterpage/Display Templates/Search/Item_Word.js" -OptimizeForFrequentUse $true

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s