Wednesday, June 4, 2014

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:

You might also like:
SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Document SharePoint Farm
Automatically generate SharePoint documentation.

Check out these SharePoint products:

No comments :

Post a Comment

Please Login and comment to get your questions answered!

You might also like:

Related Posts Plugin for WordPress, Blogger...