Getting Started with ASP.NET MVC PPTX Editor
14 Nov 20262 minutes to read
Syncfusion® ASP.NET MVC PPTX Editor enables you to view and print PowerPoint presentations in web applications.
This section explains how to add and configure the Syncfusion ASP.NET MVC PPTX Editor control in an ASP.NET MVC application.
Prerequisites
Create ASP.NET MVC Application
Create an ASP.NET MVC project using one of the following options:
Install PPTX Editor NuGet Package
To add the PPTX Editor component in the application, follow the steps below.
- Open NuGet package manager in Visual Studio (Tools → NuGet Package Manager → Manage NuGet Packages for Solution).
- Search and install the package
Syncfusion.AspNetMvc.PptxEditor.
Alternatively, you can install the PPTX Editor package from NuGet using the Package Manager Console:
Install-Package Syncfusion.AspNetMvc.PptxEditor -Version 35.1.37Add Namespace
Add the following namespace reference in the ~/Views/Web.config file:
<namespaces>
<add namespace="Syncfusion.EJ2" />
</namespaces>Add Style and Script References
Include the required Syncfusion styles and scripts in the ~/Views/Shared/_Layout.cshtml page.
<head>
<link href="https://cdn.syncfusion.com/ej2/35.1.37/tailwind3.css" rel="stylesheet" />
<script src="https://cdn.syncfusion.com/ej2/35.1.37/dist/ej2.min.js"></script>
</head>Refer to the Themes topic to learn the different ways to include Syncfusion styles (using CDN, NPM package, or CRG) and ensure the expected appearance of Syncfusion® ASP.NET MVC controls, and check the Adding Script Reference documentation to understand the various approaches for adding required script references in your ASP.NET MVC application.
Register Syncfusion Script Manager
Add the Syncfusion script manager before the closing </body> tag in ~/Views/Shared/_Layout.cshtml.
<body>
<!-- Syncfusion ASP.NET MVC Script Manager -->
@Html.EJS().ScriptManager()
</body>Add ASP.NET MVC PPTX Editor Control
Add the PPTX Editor control to the ~/Views/Home/Index.cshtml page.
@Html.EJS().PptxEditor("pptxeditor").DocumentPath("https://document.syncfusion.com/content/pptxeditor-resources/Sample.pptx").Render()Run the Application
Press Ctrl+F5 (Windows) or ⌘+F5 (macOS) to run the application.
The page displays the PPTX Editor with a toolbar, a thumbnail pane, and a slide area containing Sample.pptx. Select a thumbnail to navigate to a slide, change the zoom level, start a slideshow, or use the print command.