Customers are often asked how to view and edit documents in a browser in SharePoint, and usually the solution is to integrate Office Web apps.
And in the actual application process, the customer will usually request to realize the PDF file online view, for the PDF file, Office Web App Microsoft has not provided official support. To implement this functionality, developers typically use the following two ways:
1. Modify SharePoint so that the PDF file is opened in the browser by default, which essentially tells the browser that the document is invoked by the browser, and the local client is invoked according to the local document association, which requires the client to install Adobe Reader to open it properly. Otherwise, the download box still appears.
2. The way of document conversion, usually the idea is to convert the document into a picture or document converted into SWF file, the actual project commonly used is similar to the way Baidu documents, converted into SWF file, through the program development of a custom interface to render.
The specific approach is to upload, the automatic conversion of a SWF file, and then through the Flashpaper to show, this way to control the granularity of high, can prevent replication and download, but need to carry out a certain two development can be achieved, and because the document has two copies, information consistency also needs to be considered.
The good news is that in March this year, Microsoft released an update to office Web Apps Server 2013, which can be downloaded here: KB2760445. This update includes several new features, the most important of which is support for online viewing in PDF format.
Deployment Process Summary
Install the Office Web App2013 on a server with a domain, and then install the KB, after the installation is complete, open PowerShell, and enter the following command to farm Initialize (note owa2013 The name of the Office Web App server):
New-officewebappsfarm–internalurl HTTP://OWA2013-EXTERNALURL http://owa2013–allowhttp–editingenabled- Clipartenabled–translationenabled
Then start PowerShell on the SharePoint server and enter the following script to bind to the Office Web App Service
Add-pssnapin Microsoft.SharePoint.PowerShell
New-spwopibinding-servername owa2013-allowhttp
Set-spwopizone internal-http
If you use an HTTP connection instead of HTTPS, you need to execute the following command:
$sts = (get-spsecuritytokenserviceconfig)
$sts. Allowoauthoverhttp = $true
$sts. Update ()
When the execution is complete, the PDF file is available for viewing online: