owa

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