Configure Word Viewing service settings

 

Applies to: Word Web App Preview

Topic Last Modified: 2011-08-05

Banner stating end of support date for Office 2010 with link to more info

The information provided in this article about configuring the Word Viewing service application is aimed at IT pros who maintain Microsoft Office Web Apps installed on Microsoft SharePoint 2010 Products on a stand-alone server or on a server farm. SharePoint 2010 Products in this article refers to Microsoft SharePoint Server 2010 and Microsoft SharePoint Foundation 2010 unless otherwise noted.

This article contains the following sections:

  • Configure the Word Viewing service application settings

  • Set maximum worker processes by using Windows PowerShell

  • Set maximum rendering time by using Windows Powershell

Note

Some procedures in this article require using Windows PowerShell or SharePoint 2010 Management Shell to run cmdlets. To run SharePoint 2010 cmdlets in Windows PowerShell, you must add the Microsoft.SharePoint.PowerShell snapin by using the Add-PSSnapin cmdlet, or you can run the SharePoint 2010 cmdlets by using SharePoint 2010 Management Shell. By default, the Microsoft.SharePoint.PowerShell snapin is already registered, and the snapin is added to the SharePoint 2010 Management Shell. To run SharePoint 2010 cmdlets, you must be a member of the SharePoint_Shell_Access role on the configuration database and a member of the WSS_ADMIN_WPG local group on the computer where SharePoint 2010 Products is installed. To run scripts in Windows PowerShell or SharePoint 2010 Management Shell, you must set the execution policy by using the set-executionpolicy cmdlet, using the unrestricted parameter. For more information about the Add-PSSnapin cmdlet, see Add-PSSnapin. For more information about using Windows PowerShell with SharePoint 2010 Products, see SharePoint 2010 Products administration by using Windows PowerShell.

Configure the Word Viewing service application settings

The Word Viewing service application settings page allows administrators to set supported file formats, embedded font support, document scanning, and process settings for users viewing Word documents in a Web browser by using the Word Viewing Web App.

To configure the Word Viewing service application settings

  1. Verify that you have the following administrative credentials:

    • To change settings for the Office Web Apps service applications, you must be a member of the Farm Administrators SharePoint group on the computer that is running the SharePoint Central Administration Web site.
  2. On the Central Administration Web site, in the Application Management section, click Manage service applications.

  3. On the Service Applications page, click Word Viewing Service.

  4. On the Word Viewing Service page, configure the following settings:

    Supported File Formats Viewing   Specify which document types users can view by using this Word Viewing service application. If the file format is not selected, consumers of this service will receive an error message when they attempt to view this file type in the Web browser. By default, all file formats are supported.

    • Open XML Document   Select this setting to support .docx, .dotx, .docm, and .dotm file formats.

    • Word 97-2003 Document   Select this setting to support .doc and .dot file formats.

    Embedded Font Support   To preserve visual fidelity across different computers, a user can choose to embed a font within the document. You can use this setting to determine whether embedded fonts are used when viewing or converting documents and presentations. By default, embedded fonts are enabled.

    Word 97-2003 Document Scanning   To provide added security when loading Microsoft Word 97 through Word 2003 documents, the Word Viewing service application performs extra checks for malicious content before opening the document in the browser. These checks can have an effect on overall server performance. Disable this setting only if you trust all documents that are loaded by this service instance. By default, document scanning is enabled. To disable scanning, under Disable Word 97-2003 presentation scanning select Yes.

    Recycle Threshold   Specify the number of files which a process should be allowed to render before the process is recycled. Whenever this threshold is reached, the worker processes will be recycled, which prevents an application from indefinitely increasing memory consumption. A change to this setting requires using the IISReset command to restart IIS. By default, the recycle threshold is 5.

    Total Active Processes   Specify the number of worker processes that are dedicated to viewing Word documents. Set the value for total worker processes high enough to allow for a maximum number of service requests without diminishing worker processes from other applications. A low number of worker processes can reduce the performance and resource consumption of the Word Viewing service application. Other factors such as cache size and computer specifications might suggest a different number of total worker processes. For typical use, it is recommended that you set two worker processes for each service application per core processor. By default, three total worker processes are set. You can also configure this setting by using Windows PowerShell. For more information, see Set maximum worker processes by using Windows PowerShell later in this article.

Set maximum worker processes by using Windows PowerShell

You can set the maximum number of worker processes that are permitted to service requests for the Word Viewing service application. Set the value for maximum worker processes high enough to allow for a maximum number of service requests without diminishing worker processes from other applications. A low number of worker processes can reduce performance and resource consumption of the Word Viewing service application. Other factors such as cache size and computer specifications might suggest a different number of maximum worker processes. For typical use, it is recommended you set two worker processes for each service application per core processor.

To set maximum worker processes for the Word Viewing service application by using Windows PowerShell

  1. Using Notepad, create a text file and then copy and paste the following script into the file.

    This example specifies two worker processes for each core processor on a server with four core processors:

    $serviceAppId = (Get-SPServiceApplication | where {$_.DisplayName -eq "Word Viewing Service"}).ID 
    Set-SPWordViewingServiceApplication -Identity $serviceAppId -MaxActiveProcessCount 8
    
  2. Specify the following parameters:

    Parameter Value

    -MaxActiveProcessCount

    Number (total worker processes)

    -eq

    Name of the word viewing service application whose value you wish to change

  3. Save the file with a .ps1 file name extension to a folder where you run scripts (typically C:\scripts).

  4. In the Windows PowerShell console, at the command prompt (that is, PS C:\>), type the following command and press ENTER:

    C:\<path>\<filename>.ps1

Note

Changes to the MaxActiveProcessCount setting require an IISReset to take effect.

Set maximum rendering time by using Windows Powershell

Note

Numbers provided in this section are general estimations. The number of pages per megabyte for a Word document can vary depending on page elements, graphics, etc. The number of pages rendered per minute by a worker process can vary depending on performance factors specific to your environment. Be sure to test your configuration to make sure any changes made are suitable for your environment.

By default, SharePoint supports uploading documents up to 50 megabytes (approximately 3100 pages for a Word document). This limit can be changed by administrators using the Maximum Upload Size setting for the Web application (SharePoint Web application General Settings) to accommodate extremely large documents.

For more information about setting the Maximum Upload Size setting for a Web application, see Configure settings for a Web application (SharePoint Server 2010) or Configure settings for a Web application (SharePoint Foundation 2010).

The Word Web App supports rendering documents limited only by the Maximum Upload Size specified in SharePoint. However, the number of pages rendered by a single worker process may limit rendering time. To support rendering extremely large Word documents, you can set the maximum file rendering time (MaxRenderingLifetimeInSeconds) setting for the Word Viewing service application by using Windows PowerShell. Once fully rendered, a document will remain in the cache, and will not need to be rendered again unless it has been purged from the cache.

A Word document may contain approximately 63 pages per megabyte. Typically, up to 700 pages per minute can be rendered by a worker process. To calculate the maximum rendering time required, divide the maximum number of pages of the largest documents by 700. This will determine the number of minutes required to render the documents. Then multiply the number of minutes by 60 to determine the maximum rendering time in seconds.

For example, to support rendering a document with 7000 pages (approximately 111 megabytes): 7000/700 = 10 minutes. 10 x 60 = 600 seconds.

To set maximum rendering time for the Word Viewing service application by using Windows PowerShell

  1. Using Notepad, create a text file and then copy and paste the following script into the file.

    This example specifies a MaxRenderingLifetimeInSeconds setting of 600 seconds (10 mins):

    $serviceAppId = (Get-SPServiceApplication | where {$_.DisplayName -eq "Word Viewing Service"}).ID 
    Set-SPWordViewingServiceApplication -Identity $serviceAppId -MaxRenderingLifetimeInSeconds 600
    
  2. Specify the following parameters:

    Parameter Value

    -MaxRenderingLifetimeInSeconds

    Number (time, in seconds, that a worker process is given to process a particular rendition)

    -eq

    Name of the word viewing service application whose value that you want to change

  3. Save the file with a .ps1 file name extension to a folder where you run scripts (typically C:\scripts).

  4. In the Windows PowerShell console, at the command prompt (that is, PS C:\>), type the following command and press ENTER:

    C:\<path>\<filename>.ps1

Note

Changes to the MaxRenderingLifetimeInSeconds setting require an IISReset to take effect.