Control whether PDFs open in Word Web App or the default PDF reader
Use Windows PowerShell commands to adjust settings so that PDFs open in the program you want.
When users open a PDF file from a SharePoint document library that uses Office Web Apps Server, the default behavior is to open the PDF in Word Web App. If this isn’t the behavior you want, or if your users are having trouble opening PDFs on smartphones, you can use Windows PowerShell commands to make PDFs open in your default PDF reader instead. Here's how:
Step 1: Open an elevated SharePoint 2013 Management Shell
On the computer running SharePoint Server 2013 or SharePoint Foundation 2013, open an elevated SharePoint 2013 Management Shell. Choose the procedure that corresponds to your server operating system:
- In Windows Server 2008 R2:
On the Start menu, select All Programs.
Select Microsoft SharePoint 2013 Products.
Choose (right-click) SharePoint 2013 Management Shell to display the shortcut menu.
From the shortcut menu, choose Run as administrator.
In Windows Server 2012:
Swipe in from the edge of the screen to show the charms and then choose Search to see all the applications that are installed on the computer.
Choose (right-click) SharePoint 2013 Management Shell to display the app bar.
In the app bar, select Run as administrator.
Step 2: Run the Windows Powershell Command
At the Windows PowerShell prompt, enter one of the following commands, based on what you want to do:
-
To adjust the binding so that smartphones won’t try to view PDFs in Word Web App (but other devices will continue to), enter the following command and then press Enter:
Get-SPWopiBinding -Action "MobileView" -Application "WordPDF" | Remove-SPWopiBinding -Confirm:$false
To remove the binding altogether so that PDFs open in the default PDF viewer on all devices, use the following:
Get-SPWOPIBinding –Application "WordPDF" | Remove-SPWOPIBinding -Confirm:$false
Going back
If you change your mind and later want to have PDFs open in Word Web App again, follow the same procedure as above, but in Step 2, run these two commands:
Get-SPWOPIBinding –Application "WordPDF" | Remove-SPWOPIBinding -Confirm:$false
New-SPWOPIBinding –ServerName "Server.corp.Contoso.com" –Application "WordPDF" -AllowHTTP
Be sure to use your own Office Web Apps server name instead of “Server.corp.Contoso.com.”
Resources
Use Windows PowerShell to administer SharePoint 2013
-Chris
Comments
Anonymous
January 01, 2003
Nice tip. Thanks for sharing.Anonymous
January 01, 2003
@Paul, yes, the bindings are very configurable. For example, to remove all bindings to the Word Web App, you can use this command: Get-SPWOPIBinding -Application "Word" | Remove-SPWOPIBinding -Confirm:$false Or substitute "Excel" in place of "Word" to remove bindings to the Excel Web App. You can also remove bindings for specific file name extensions (such as .doc or .dotm), or specific actions, like "view" or "edit". See the Remove-SPWOPIBinding link under "Resources" above for all the options. -ChrisAnonymous
January 01, 2003
Thanks, very helpfulAnonymous
January 01, 2003
thank you indeedAnonymous
July 26, 2013
Is there a similar command to force Word and Excel documents to open in the full defautl application (MS Office) rather than the web app? Thanks so much.Anonymous
September 03, 2013
Hello Chris Downs, I only use the Office Web App Server without Sharepoint. Its WordPDF enable it? For viewing online?Anonymous
September 03, 2013
We aren't running server version. How do I change it for my laptop only?Anonymous
November 04, 2013
Hi Chris, This info doe not apply to SharePoint for Office 365, correct? Any way to adjust the application binding with Office 365? Thank you.Anonymous
November 04, 2013
Hi Paul, That's correct, this post only applies to the on-premises Office Web Apps Server product and how you configure it with SharePoint 2013. In Office 365, you can turn the Office Web Apps off for a document library, but you can't configure individual bindings. Also, Office 365 does not provide the feature where PDFs open in Word Web App; PDFs will always open in your default PDF program when you open them from an Office 365 document library. If you want to turn off the Office Web Apps for an Office 365 document library, use the following procedure.
- In the document library, choose Settings (the gear menu) and then "Site Settings."
- Under "Site Administration," choose "Site libraries and lists."
- Choose "Customize (library name)." and then "Advanced settings."
- Under "Opening Documents in the Browser," select "Open in the client application" and click OK. Hopefully this answers some of the earlier questions as well! Thanks, -Chris
Anonymous
November 06, 2013
The comment has been removedAnonymous
November 08, 2013
Sorry Michael, I can't seem to make it throw that error. Are the Office Web Apps working OK for other types of documents, like .docx and .xlsx? Which protocol are you using, HTTP or HTTPS? Thanks, -ChrisAnonymous
November 13, 2013
It seems WordPdf action is different from other applications (Word, Excel...). If I enabled OpenInClient feature, PDF attachments may still be opened (left-click) in WopiFrame, others opened in client. And [save as...] with right-click will use normal link to the attachment file. If I disabled OpenInClient feature, [save as...] with right-click will use link with WopiFrame. I can't save correctly. How can I open all types in WopiFrame by left-click, and save all types correctly by right-click? Thank you very much.Anonymous
November 14, 2013
Hi marksu22, great question! Unfortunately I don't know of a way to configure the right-click > Save target as... action differently from the View action. I agree that it would make more sense to be able to right-click and save the .pdf file as usual, even when WordPDF viewing is enabled. I'll pass that feedback on to the product team and let you know if they have any workarounds for this. Thank you, -ChrisAnonymous
November 14, 2013
Hi again marksu22, you should be able to save the document by using the SharePoint download feature. In the document library, click the ellipsis (...) next to the document title, then click the other ellipsis (...) at the bottom of the document menu, then click Download a copy. Hope this addresses your problem. Thanks, -ChrisAnonymous
November 19, 2013
Thank you Chris. This download instruction will be added to the Q&A for users for now. Thanks.Anonymous
December 07, 2013
I recently installed office 365 university on my computer, can I open PDF files or do I need another program.Anonymous
December 09, 2013
Hi Elmer, Thanks for your question. In Office 365, PDF files currently do not open in the Word Web App as they do in the on-premises Office Web Apps, so you'll need to install another PDF reader such as the free Adobe Reader. Hope this helps. -ChrisAnonymous
May 05, 2014
Sir,
I have installed wordweb recently . Now when i will be reading a pdf doc or in ms word, when i select a word in it(highlight), when i right click is there any setting to be done so that i gives suggestion to me that lookup in wordweb dictionary, Please let me know.Anonymous
May 12, 2014
Thanks Chris for this article. I have issues accessing PDF and Word file in one Web application, the other web application works charm... Any idea or inputs....Anonymous
May 14, 2014
Hi! How do you change it so PDFS will open in Word but everything else will open in Adobe?Anonymous
August 08, 2014
Hi Chris! For such a long time WordPDF is disabled from O365. I don't care what kind of "issues" some companies experienced, our company needs the preview option badly. WHY is it so difficult to implement an administrative switch to enable/disable PDF view on a library or site level? Or when are any improvements expected?Anonymous
September 05, 2014
We are using IRM and when I use this powershell it breaks security. Our users are tired of downloading to print. Have found any other way to do this?Anonymous
November 30, 2014
Thanks a lotAnonymous
January 09, 2015
I have tried "Get-SPWOPIBinding –Application "WordPDF" | Remove-SPWOPIBinding -Confirm:$false" and configured the Bibliothek that pdfs should open in Client application, but it doesnt work. PDFs are always opened in my Browser.
What can i do?
Thanks a lot.Anonymous
January 14, 2015
Thanks. it helps a lotAnonymous
February 26, 2015
But if I remove WordPDF application, wouldn’t that also disable pdf-previews in search and document libraries?Anonymous
April 02, 2015
Thank you, the script solved my issue.Anonymous
April 20, 2015
how to open PDF on clicking on the iconAnonymous
September 01, 2015
Hi Chris, instead of
Get-SPWopiBinding -Action "MobileView" -Application "WordPDF" | Remove-SPWOPIBinding
why not just
Remove-SPWOPIBinding -Application "WordPDF" -Action "Mobile View"Anonymous
September 14, 2015
Hi Chris,
I'm in a situation that there are several file types(docx, xls and pdf) in a single document library. I've disable the wordpdf binding as u mentions above and it give me a message "Viewing of .pdf files has been disabled in Microsoft Word Mobile Viewer. Please get in touch with your helpdesk." in mobile. But I do not want to configure all of the extension to be open in client application. Any other work around as u may recommend ?Anonymous
October 01, 2015
Even though i removed the binding Get-SPWopiBinding -Action "MobileView" -Application "WordPDF" | Remove-SPWOPIBinding still pdf files tries to open in office web app and giving the error since i removed. Do i need to do any additional steps after removing binding.Anonymous
December 06, 2015
I ran this command, but after that, any office document gives out a "An error has occurred on the server" error.. could you please help? The PDFs open fine in a client app.