SharePoint 中的 PowerPoint Automation ServicesPowerPoint Automation Services in SharePoint

了解如何使用 Microsoft PowerPoint Automation Services 在多种文件格式之间来回进行服务器端演示文稿转换。Learn to use Microsoft PowerPoint Automation Services to do server-side presentation conversions to and from a variety of file formats.

简介Introduction

许多大型和小型企业都使用 Microsoft SharePoint Server 库作为 Microsoft PowerPoint 演示文稿存储库。Many businesses, large and small, use their Microsoft SharePoint Server libraries as a repository for Microsoft PowerPoint presentations. 所有这些公司都有自己的特定演示文稿存储、分发和更新需求。These businesses all have their own particular needs for storing, distributing, and updating their presentations. Microsoft PowerPoint Automation Services 是一项 Microsoft SharePoint 新功能,可以帮助企业管理演示文稿。Microsoft PowerPoint Automation Services is a new feature of Microsoft SharePoint that can help enterprises to manage their presentations. 这是一项共享服务,可用于对演示文稿执行无人参与的服务器端转换,将演示文稿转换为其他格式。It is a shared service that provides unattended, server-side conversion of presentations into other formats. 它的设计初衷就是为了能够在服务器上运行,并以可预测的方式可靠处理许多演示文稿文件。It was designed from the outset to work on servers and can process many presentation files in a reliable and predictable manner.

通过使用 PowerPoint Automation Services,可以从 PowerPoint 二进制文件格式 (.ppt) 和 PowerPoint Open XML 文件格式 (.pptx) 转换为其他格式。例如,您可能需要将一批 PowerPoint 97-2003 文件升级到 Open XML 演示文稿文件。您还可以在"编辑"菜单中创建自定义操作,以允许用户按需创建 PDF 版本的演示文稿。Using PowerPoint Automation Services, you can convert from the PowerPoint binary file format (.ppt) and the PowerPoint Open XML file format (.pptx) to other formats. For example, you may want to upgrade a batch of PowerPoint 97-2003 files to Open XML presentation files. You could also create a custom action in the Edit menu to allow users to create a PDF version of presentations on demand.

备注

PowerPoint Automation Services 利用 SharePoint 设施,同时也是一项 SharePoint 功能。PowerPoint Automation Services takes advantage of facilities of SharePoint and is a feature of it. 必须安装 SharePoint,才能使用 PowerPoint Automation Services。You must have SharePoint installed to use PowerPoint Automation Services. 如果在服务器场中使用的是 SharePoint,必须显式启用 PowerPoint Automation Services。If you are using SharePoint in a server farm, you must explicitly enable PowerPoint Automation Services.

PowerPoint Automation Services 方案PowerPoint Automation Services scenarios

下列方案描述了可通过 PowerPoint Automation Services 在服务器上自动处理演示文稿的两种方式:The following scenarios describe a couple of ways that you can use PowerPoint Automation Services to automate processing presentations on a server:

  • 大型企业将其所有年收益演示文稿存储在企业 Intranet 网站上的单个文档库中。该库包含多年累积的大量演示文稿。IT 部门需要将 PowerPoint 97-2003 二进制文件格式 (.ppt) 的所有演示文稿文件转换为 Open XML 演示文稿文件格式 (.pptx)。执行此转换的开发人员决定执行以下操作:将解决方案部署到将循环访问库中的所有文件的服务器,检查以确定该文件的格式是否为 .ppt 并将每个 .ppt 文件转换为 .pptx 文件格式。A large enterprise stores all of their yearly earnings presentations in a single document library on a corporate intranet site. The library contains a large number of presentations that have accumulated over the years. The IT department wants to upgrade all of the presentation files in the PowerPoint 97-2003 binary file format (.ppt) to the Open XML presentation file format (.pptx). The developer who is performing the conversion decides to deploy a solution to the server that will iterate through each of the files in the library, check to see whether the file is in the .ppt format, and convert each .ppt file to the .pptx file format.

  • 地区销售部门向其所有客户提供了自定义服务估计值。每个销售人员将在现场会议或在线会议上与其客户审查其报价。在会议结束后,销售人员将向客户提供一份 PDF 格式的报价单副本。该部门聘请了一个供应商在"编辑"菜单中为存储在其 Extranet 中的文档库中的 PowerPoint 文件创建一个自定义动词。单击此动词时,服务器将运行一个程序,此程序会将 PowerPoint 文件转换为位于同一个库中的 PDF。A regional sales department provides custom service estimates to each of their clients. Each salesperson reviews their quotes with clients in a meeting, either in-person or online. After the meeting, the salesperson provides a copy of the quote to the customer in the form of a PDF. The department hires a vendor to create a custom verb in the Edit menu for PowerPoint files stored in a document library in their extranet. When the verb is clicked, the server runs a program that converts the PowerPoint file to a PDF located in the same library.

支持的源演示文稿格式Supported source presentation formats

以下是适用于转换的受支持的源演示文稿格式:The supported source presentation formats for conversion are as follows:

  • Open XML 文件格式演示文稿格式 (.pptx)Open XML File Format presentation format (.pptx)

  • PowerPoint 97-2003 演示文稿 (.ppt)PowerPoint 97-2003 presentation (.ppt)

支持的目标文档格式Supported destination document formats

支持的目标文档格式包括所有支持的源文档格式,以及以下格式:The supported destination document formats include all of the supported source document formats and the following:

  • .pptx(Open XML 文件格式演示文稿格式).pptx (Open XML File Format presentation format)

  • .pdf.pdf

  • .xps(Open XML 纸张规范).xps (Open XML Paper Specification)

  • .jpg.jpg

  • .png(可移植网络图形格式).png (Portable Network Graphics Format)

PowerPoint Automation Services 的限制Limitations of PowerPoint Automation Services

PowerPoint Automation Services 不包括打印文档的功能。但是它能够直接将 PowerPoint 演示文稿文件(.ppt 和 .pptx)转换为 PDF 或 XPS,并将它们后台打印至打印机。PowerPoint Automation Services does not include capabilities for printing documents. However, it is straightforward to convert PowerPoint presentation files (.ppt and .pptx) to PDF or XPS and spool them to a printer.

PowerPoint Automation Services APIPowerPoint Automation Services API

若要使用 PowerPoint Automation Services,请使用它的编程接口,向 SharePoint 服务器发送转换请求。To use PowerPoint Automation Services, you use its programming interface to send a conversion request to the SharePoint server. 对于每个转换请求,请指定要转换的文件,以及转换作业的输出格式。For each conversion request, you specify which files you want to convert and the output format of the conversion job. 对于一些转换请求,还可以指定转换内容类型,包括注释、隐藏幻灯片或文档属性。For some conversion requests, you can also specify what types of content is converted, including comments, hidden slides, or document properties.

PowerPoint Automation Services 使用用于发送和接收转换请求的异步模式方法。因而,您可以编写在发送转换请求后继续执行的代码。如果您需要在完成转换请求后向用户发送通知,可以指定引用在操作完成时执行的回调方法的委托。PowerPoint Automation Services uses the asynchronous pattern method for sending and receiving conversion requests. Thus, you can write code that continues to execute after a conversion request has been sent. If you need to provide notification to users after a conversion request has been completed, you can specify a delegate that references a callback method to execute when the operation completes.

备注

若要详细了解如何使用异步设计模式,请参阅异步编程概述For more information about how to work with the asynchronous design pattern, see the Asynchronous Programming Overview.

以下各节包含了一组有限数量的类,这些类是发送和接收转换请求所必需的。所有这些类都包含在 Microsoft.Office.Server.PowerPoint.Conversion 命名空间中。The sections below contain a limited list of the classes that are necessary for sending and receiving a conversion requests. All of these classes are contained in the Microsoft.Office.Server.PowerPoint.Conversion namespace.

请求基类Request Base Class

Request 类是 Microsoft.Office.Server.PowerPoint.Conversion 命名空间中的最基本类。所有其他请求 类型( PresentationRequestPictureRequestPdfRequestXpsRequest)都从该类继承。The Request class is the most fundamental class within the Microsoft.Office.Server.PowerPoint.Conversion namespace. All of the otherrequest types— PresentationRequest, PictureRequest, PdfRequest, and XpsRequest—inherit from it.

表 1. 请求基类成员Table 1. Request base class members

成员名称Member name 说明Description
BeginConvert(Microsoft.SharePoint.SPServiceContext, System.AsyncCallback, System.Object) 方法BeginConvert(Microsoft.SharePoint.SPServiceContext, System.AsyncCallback, System.Object) method
开始转换操作。第一个参数为 serviceContext,该参数指定要转换的文件所在的 SharePoint 网站的上下文。使用 callback 参数可指定引用在操作完成时执行的方法的委托。如果您需要将任何其他信息从调用代码传递到回调方法,请使用 state 参数。Begins the conversion operation. The first parameter, serviceContext, specifies the context of the SharePoint site where the file to be converted is located. Use the callback parameter to specify a delegate that references a method to execute once the operation has completed. Use the state parameter if you need to pass any additional information from the calling code to the callback method.
返回一个 IAsyncResult 对象。Returns an IAsyncResult object.
EndConvert(IAsyncResult) 方法EndConvert(IAsyncResult) method
结束转换操作。 result 参数需要相应的 BeginConvert 转换请求返回的结果 IAsyncResult 对象。如果该请求在调用 EndConvert 时尚未完成,则将阻止调用线程,直到转换操作完成。Ends the conversion operation. The result parameter expects the resulting IAsyncResult object that the corresponding BeginConvert conversion request returns. If that request has not been completed when EndConvert is called, the calling thread is blocked until the conversion operation is complete.
不返回值。Does not return a value.

PresentationRequest 类PresentationRequest class

PresentationRequest 类(继承自 Request 类)将 PowerPoint 97-2003 文件 (.ppt) 或 Open XML 文件格式演示文稿 (.pptx) 转换为其他演示文稿文件格式。在上面提及的第一种方案中,您使用此类将文档库中的旧的演示文稿文件转换为 Open XML 文件格式演示文稿格式。The PresentationRequest class, which inherits from the Request class, converts a PowerPoint 97-2003 file (.ppt) or Open XML File Format presentation (.pptx) to another presentation file format. In the first scenario mentioned above, you use this class to convert older presentation files in a document library to the Open XML File Format presentation format.

PresentationRequest 类的构造函数方法具有三个必需参数:The constructor method for the PresentationRequest class has three required parameters:

  • input - 采用需要转换为 Stream 对象的文件。input—Takes the file that you want to convert as a Stream object.

  • extension - 指定将转换的文件的文件扩展名的字符串。extension—A string that specifies the file extension of the file being converted.

  • output - 指定将存储输出的 SPFileStream 对象。output—An SPFileStream object that specifies where the output will be stored.

PresentationRequest 类具有针对其添加 settings 参数的构造函数方法的单个重载。 settings 参数接受 PresentationSettings 对象作为参数。The PresentationRequest class has a single overload for its constructor method that adds a settings parameter. The settings parameter accepts a PresentationSettings object as an argument.

提示: 将输出 Stream 对象转换回 SPFile 对象时,请检查生成文件的给定扩展名是否与所需文件类型扩展名(.ppt 或 .pptx)一致。Tip: When converting the output Stream object back to an SPFile object, check that the extension given to the resulting file matches the extension of the file type that you want (.ppt or .pptx).

PdfRequest 类PdfRequest class

PdfRequest 类(也继承自 Request 类)将 PowerPoint 97-2003 文件 (.ppt) 或 Open XML 文件格式演示文稿 (.pptx) 转换为 .pdf 文件。在上面提及的第二种方案中,您使用此类将演示文稿转换为 PDF 文件。The PdfRequest class, which also inherits from the Request class, converts a PowerPoint 97-2003 file (.ppt) or Open XML File Format presentation (.pptx) to a.pdf file. In the second scenario mentioned above, you use this class to convert presentations to PDF files.

PdfRequest 类的构造函数方法也具有三个必需参数( inputextensionoutput),这类似于 PresentationRequest 类。The constructor method for the PdfRequest class also has three required parameters— input, extension, and output—similar to the PresentationRequest class.

PdfRequest 类也具有针对其添加 settings 参数的构造函数方法的单个重载。 settings 参数接受 FixedFormatSettings 对象作为参数。The PdfRequest class also has a single overload for its constructor method that adds a settings parameter. The settings parameter accepts a FixedFormatSettings object as an argument.

提示: 将输出 Stream 对象转换回 SPFile 对象时,请检查生成文件的给定扩展名是否与所需文件类型扩展名 (.pdf) 一致。Tip: When converting the output Stream object back to an SPFile object, check that the extension given to the resulting file matches the extension of the file type that you want (.pdf).

PictureRequest 类PictureRequest class

PictureRequest 类(也继承自 Request 类)将 PowerPoint 97-2003 文件 (.ppt) 或 Open XML 文件格式演示文稿 (.pptx) 转换为一组 .jpg 或 .png 格式的图像文件。The PictureRequest class, which also inherits from the Request class, converts a PowerPoint 97-2003 file (.ppt) or Open XML File Format presentation (.pptx) to a collection of image files in either the.jpg or .png format.

此外, PictureRequest 类的构造函数方法具有四个必需参数。 inputextensionoutput 参数与 PresentationRequest 类构造函数的参数类似。 PictureRequest 类的构造函数方法也具有必需的 format 参数,该参数必需是 PictureFormat 枚举中的常数。The constructor method for the PictureRequest class also has four required parameters. The input, extension, and output parameters are similar to the parameters for the PresentationRequest class constructor. The constructor method for the PictureRequest class also has a required format parameter, which must be a constant from the PictureFormat enumeration.

PictureRequest 类不重载它的构造函数方法。The PictureRequest class does not have any overloads for its constructor method.

提示:****PictureRequest 类返回包含图像文件包的流。Tip: The PictureRequest class returns a stream that contains a package of image files. 将输出 Stream 对象转换回 SPFile 对象时,请检查生成文件的给定扩展名是否为 .zip。When converting the output Stream object back to an SPFile object, check that the extension given to the resulting file is .zip.

生成 PowerPoint Automation Services 应用Building a PowerPoint Automation Services application

说明如何编写使用 PowerPoint Automation Services 的代码的最简单方法是构建控制台应用程序。你必须在 SharePoint Server 上构建和运行控制台应用程序,而不是在客户端计算机上。启动转换请求的代码是类似的,无论转换请求代码是集成到 Web 部件、工作流还是事件处理程序中。通过从控制台应用程序使用 PowerPoint Automation Services,以下过程说明了如何在不增加 Web 部件、事件处理程序或工作流的复杂性的情况下使用 API。The easiest way to show how to write code that uses PowerPoint Automation Services is to build a console application. You must build and run the console application on the SharePoint Server, not on a client computer. The code to start conversion requests is similar whether the conversion request code is incorporated into a web part, a workflow, or an event handler. By using PowerPoint Automation Services from a console application, the following procedure shows how to use the API without adding the complexities of a web part, an event handler, or a workflow.

备注

由于 PowerPoint Automation Services 是一项 SharePoint 服务,因此只能在直接在 SharePoint Server 上运行的应用中使用它。Because PowerPoint Automation Services is a service of SharePoint, you can use it only in an application that runs directly on a SharePoint Server. 必须将应用生成为场解决方案。You must build the application as a farm solution. 不能通过沙盒解决方案使用 PowerPoint Automation Services。You cannot use PowerPoint Automation Services from a sandboxed solution.

生成应用的具体步骤To build the application

  1. 启动 Microsoft Visual Studio 2012。Start Microsoft Visual Studio 2012.

  2. 在"文件"菜单上,指向"新建",然后选择"项目"。On the File menu, point to New, and then choose Project.

  3. 在"新建项目"对话框中的"已安装"下方,依次展开"模板"和"Visual C#",然后选择"Windows"。In the New Project dialog box, under Installed, expand Templates, expand Visual C#, and then chose Windows.

  4. 在项目模板列表中,单击"控制台应用程序"。In the list of project templates, choose Console Application.

  5. 请确保 Visual Studio 项目定目标到 .NET Framework 4。Be sure that the project in Visual Studio targets .NET Framework 4.

    备注

    旧版 SharePoint Server 要求定目标到 .NET Framework 3.5。Previous versions of SharePoint Server required that you target .NET Framework 3.5. Microsoft.SharePoint 库现在引用 .NET Framework 4 中的程序集。The Microsoft.SharePoint libraries now reference assemblies in .NET Framework 4. 此外,还请确保项目定目标到完整 .NET Framework 4,而不是 .NET Framework 4 客户端配置文件。Also make sure that your project targets the full .NET Framework 4 and not the .NET Framework 4 Client Profile.

  6. 在“名称”**** 框中,键入要为项目命名的名称(如“PAS_Sample”)。In the Name box, type the name that you want to use for your project, such as PAS_Sample.

  7. 在"位置"框中,键入您要放置项目的位置。In the Location box, type the location where you want to place the project.

  8. 单击"确定"以创建解决方案。Click OK to create the solution.

  9. 默认情况下,Visual Studio 2008 创建面向 x86 CPU 的项目,但是若要构建 SharePoint Server 应用程序,您必须面向所有 CPU。By default, Visual Studio 2012 creates projects that target x86 CPUs, but to build SharePoint Server applications, you must target any CPU.

    如果您要构建 Microsoft Visual C# 应用程序,请在"解决方案资源管理器"中,右键单击项目,然后单击"属性"。If you are building a Microsoft Visual C# application, in Solution Explorer, right-click the project, and then click Properties.

  • 在项目"属性"窗口中,单击"构建"。In the project Properties window, click Build.

  • 指向"配置"列表,并选择"所有配置"。Point to the Configuration list, and select All Configurations.

  • 指向"平台目标"列表,并选择"任何 CPU"。Point to the Platform Target list, and select Any CPU.

    如果您要构建 Microsoft Visual Basic .NET Framework 应用程序,请在"属性"窗口中,单击"编译"。If you are building a Microsoft Visual Basic .NET Framework application, in the Properties window, click Compile.

  • 单击"高级编译选项"。Click Advanced Compile Options.

  • 指向"配置"列表,并选择"所有配置"。Point to the Configuration list, and then select All Configurations.

  • 指向"平台目标"列表,然后选择"任何 CPU"。Point to the Platform Target list, and then click Any CPU.

  1. 在"项目"菜单上,单击"添加引用"以打开"添加引用"对话框。On the Project menu, click Add Reference to open the Add Reference dialog box.

  2. 展开"程序集",然后执行下列操作:Expand Assemblies, and then do the following:

  • 展开"框架",然后添加对 System.Web 的引用。Expand Framework, and then add a reference to System.Web.

  • 展开"扩展名",然后添加对 Microsoft.SharePoint 的引用。Expand Extensions, and then add a reference to Microsoft.SharePoint.

  1. 此外,在“添加引用”**** 对话框中,选择“浏览”****,转到 Microsoft.Office.Server.PowerPoint.dll 的位置(默认位置为 C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Microsoft.Office.Server.PowerPoint\v4.0_15.0.0.0__71e9bce111e9429c),再依次选择程序集和“添加”****。Also in the Add Reference dialog box, choose Browse, navigate to the location for the Microsoft.Office.Server.PowerPoint.dll (default location is C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Microsoft.Office.Server.PowerPoint\v4.0_15.0.0.0__71e9bce111e9429c), select the assembly, and then choose Add.

下面的 C# 和 Visual Basic 示例说明了一个简单 PowerPoint Automation Services 应用程序,该应用程序将 SharePoint 网站的共享文档文件夹中的 PowerPoint 97-2003 文件 (.ppt) 转换为同一文件夹中的 PowerPoint Open XML 文件 (.pptx)。The following C# and Visual Basic examples show a simple PowerPoint Automation Services application that converts a PowerPoint 97-2003 file (.ppt) in the Shared Documents folder of a SharePoint site to a PowerPoint Open XML file (.pptx) in the same folder.


using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Web;
using Microsoft.SharePoint;
using Microsoft.Office.Server.PowerPoint.Conversion;

namespace PAS_Sample
{
    class Program
    {
        static void Main(string[] args)
        {
            try
            {
                string siteURL = "http://localhost";
                using (SPSite site = new SPSite(siteURL))
                {
                    using (SPWeb web = site.OpenWeb())
                    {
                        Console.WriteLine("Begin conversion");

                        // Get a reference to the "Shared Documents" library 
                        // and the presentation file to be converted.
                        SPFolder docs = web.Folders[siteURL + 
                            "/Shared Documents"];
                        SPFile file = docs.Files[siteURL + 
                            "/Shared Documents/Pres1.ppt"];

                        // Convert the file to a stream and create an
                        // SPFileStream object for the conversion output.
                        Stream fStream = file.OpenBinaryStream();
                        SPFileStream stream = new SPFileStream(web, 0x1000);

                        // Create the presentation conversion request.
                        PresentationRequest request = new PresentationRequest(
                            fStream,
                            ".ppt",
                            stream);

                        // Send the request synchronously, passing
                        // in a 'null' value for the callback parameter, 
                        // and capturing the response in the result object.
                        IAsyncResult result = request.BeginConvert(
                            SPServiceContext.GetContext(site),
                            null,
                            null);

                        // Use the EndConvert method to get the result. 
                        request.EndConvert(result);

                        // Add the converted file to the document library.
                        SPFile newFile = docs.Files.Add(
                            "newPres1.pptx", 
                            stream, 
                            true);
                        Console.WriteLine("Output: {0}", newFile.Url);

                    }
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine("Error: " + ex.Message);
            }
            finally
            {
                Console.WriteLine("Complete");
                Console.ReadKey();
            }
        }
    }
}

Imports System
Imports System.Collections.Generic
Imports System.IO
Imports System.Linq
Imports System.Text
Imports System.Web
Imports Microsoft.SharePoint
Imports Microsoft.Office.Server.PowerPoint.Conversion

Namespace PAS_Sample
    Class Program
        Private Shared Sub Main(args As String())
            Try
                Dim siteURL As String = "http://localhost"
                Using site As New SPSite(siteURL)
                    Using web As SPWeb = site.OpenWeb()
                        Console.WriteLine("Begin conversion")

                        ' Get a reference to the "Shared Documents" library 
                        ' and the presentation file to be converted.
                        Dim docs As SPFolder = web.Folders(siteURL + _
                            "/Shared Documents")
                        Dim file As SPFile = docs.Files(siteURL + _
                            "/Shared Documents/Pres1.ppt")

                        ' Convert the file to a stream and create an
                        ' SPFileStream object for the conversion output.
                        Dim fStream As Stream = file.OpenBinaryStream()
                        Dim stream As New SPFileStream(web, &H1000)

                        ' Create the presentation conversion request.
                        Dim request As New PresentationRequest(fStream, _
                            ".ppt", 
                            stream)

                        ' Send the request synchronously, passing
                        ' in a Nothing value for the callback parameter, 
                        ' and capturing the response in the result object.
                        Dim result As IAsyncResult = request.BeginConvert(_
                            SPServiceContext.GetContext(site), _
                            Nothing, _
                            Nothing)

                        ' Use the EndConvert method to get the result. 
                        request.EndConvert(result)

                        ' Add the converted file to the document library.
                        Dim newFile As SPFile = docs.Files.Add(_
                            "newPres1.pptx", _
                            stream, _
                            True)

                        Console.WriteLine("Output: {0}", newFile.Url)
                    End Using
                End Using
            Catch ex As Exception
                Console.WriteLine("Error: " + ex.Message)
            Finally
                Console.WriteLine("Complete")
                Console.ReadKey()
            End Try
        End Sub
    End Class
End Namespace

构建和运行示例To build and run the example

  1. 将 PowerPoint 文档(名为 Pres1.ppt )添加到 SharePoint 网站中的共享文档文件夹。Add a PowerPoint document named Pres1.ppt to the Shared Documents folder in the SharePoint site.

  2. 构建和运行示例。Build and run the example.

  3. 等待一分钟以便转换进程开始运行,然后导航至 SharePoint 网站中的共享文档文件夹,并刷新页面。文档库中目前包含一个新的 PowerPoint 文档 Pres1.pptx。After waiting one minute for the conversion process to run, navigate to the Shared Documents folder in the SharePoint site, and refresh the page. The document library now contains a new PowerPoint document, Pres1.pptx.

SharePoint 上的 PowerPoint Automation Services 为企业提供用于管理演示文稿文件的高级功能。PowerPoint Automation Services on SharePoint provides businesses with advanced capabilities for managing their presentation files. 借助这一高性能解决方案,能够以可扩展的方式在服务器端批处理或按需控制和生成演示文稿。This high-performance solution allows scalable, server-side presentation manipulation and generation, as a batch or on-demand.

备注

必须先确保已在 SharePoint 管理中心控制台内启用 PowerPoint Automation Services,然后才能运行此示例。Before you run the example, make sure that PowerPoint Automation Services has been enabled in the SharePoint Central Administration console.
若要验证是否已启用 PowerPoint Automation Services,请按照以下步骤操作:To verify that PowerPoint Automation Services is enabled, do the following:

  • 在管理中心控制台中的"系统设置"下方,选择"管理服务器上的服务",然后确保"PowerPoint Conversion Service"设置为"已启动"。 In the Central Administration console, under System Settings, choose Manage services on server, and then make sure that the PowerPoint Conversion Service is set to Started.
  • 此外,在管理中心控制台中的"应用程序管理"下方,选择"管理服务应用程序",然后确保"PowerPoint Conversion Service 应用程序"和"PowerPoint Conversion Service 应用程序代理"都设置为"已启动"。Also in the Central Administration console, under Application Management, choose Manage service applications, and then make sure that the PowerPoint Conversion Service Application and PowerPoint Conversion Service Application Proxy are set to Started.

结束语Conclusion

SharePoint 上的 PowerPoint Automation Services 为企业提供用于管理演示文稿文件的高级功能。PowerPoint Automation Services on SharePoint provides businesses with advanced capabilities for managing their presentation files. 借助这一高性能解决方案,能够以可扩展的方式在服务器端批处理或按需控制和生成演示文稿。This high-performance solution allows scalable, server-side presentation manipulation and generation, as a batch or on-demand.

另请参阅See also