Enable PDF Preview in SharePoint 2013 with Office Web Apps

PDF preview for SharePoint 2013 integrated with Office web apps isn’t enabled by default. Use this below script to enable PDF previews in SharePoint 2013 search results.

SharePoint 2013 office web apps PDF preview:

Add-PSSnapin Microsoft.SharePoint.PowerShell -erroraction SilentlyContinue

$TenantOwner = Get-SPEnterpriseSearchOwner -Level SSA

#Search Service application name
$ssa = "Search Service Application" 

$Rule = Get-SPEnterpriseSearchPropertyRule -PropertyName "FileType" -Operator "IsEqual"
$RuleCollection = Get-SPEnterpriseSearchPropertyRuleCollection

$Item = New-SPEnterpriseSearchResultItemType -Owner $TenantOwner -SearchApplication $ssa -Name "PDF Preview" -Rules $RuleCollection -RulePriority 1 -DisplayProperties "Title,Author,Size,Path,Description,EditorOWSUSER,LastModifiedTime,CollapsingStatus,DocId,HitHighlightedSummary,HitHighlightedProperties,FileExtension,ViewsLifeTime,ParentLink,ViewsRecent, FileType,IsContainer,SecondaryFileExtension,DisplayAuthor,docaclmeta,ServerRedirectedURL,SectionNames,SectionIndexes,ServerRedirectedEmbedURL, ServerRedirectedPreviewURL" -DisplayTemplateUrl "~sitecollection/_catalogs/masterpage/Display Templates/Search/Item_Word.js" -OptimizeForFrequentUse $true

SharePoint 2013 PDF preview in Search results:

sharepoint 2013 office web apps enable pdf preview

SharePoint 2013 enabling PDF previews in document libraries:
Wictor Wilen has written a great tool to enable PDF previews in SharePoint 2013 document libraries with Office Web Apps 2013: https://www.wictorwilen.se/sharepoint-2013-enabling-pdf-previews-in-document-libraries-with-office-web-apps-2013

Salaudeen Rajack

Salaudeen Rajack - SharePoint Expert with Two decades of SharePoint Experience. Love to Share my knowledge and experience with the SharePoint community, through real-time articles!

One thought on “Enable PDF Preview in SharePoint 2013 with Office Web Apps

  • Hi. You must connect the Farm to Owa first and bind the WordPdf app

    New-SPWOPIBinding -ServerName OWA.SITE.DOMAIN -Application WordPdf


Leave a Reply

Your email address will not be published. Required fields are marked *