In this example, a Power Point item is added to the list of available export formats in the Web Document Viewer, and the custom ExportToPowerPoint method is implemented.
Note: The resulting document is exported by rasterizing each page to an image / slide (no native PowerPoint inner elements). This example uses the
Microsoft.Office.Interop.PowerPoint
library, which requires a local installation of PowerPoint. You can also implement a similar solution with any other library that supports PowerPoint document generation.
The CustomizeMenuActions event is handled to add a custom menu item.
The application registers a CustomOperationLogger class as the WebDocumentViewerOperationLogger service. The CustomOperationLogger class overrides the ExportDocumentStarting method to call the ExportToPowerPoint method when the user initializes export to PowerPoint.
You have to install the Office Developer Tools for Visual Studio to build the project, and have a local Microsoft Office (PowerPoint) installation to run the project.
- CustomOperationLogger.cs (CustomOperationLogger.vb)
- Presentation.cs (CustomOperationLogger.vb)
- Global.asax.cs (Global.asax.vb)
- Viewer.aspx (Viewer.aspx)
(you will be redirected to DevExpress.com to submit your response)