Discover how to edit headers and footers in PowerPoint using the C# REST API. This tutorial walks you through setting headers and footers with a C# RESTful service powered by the .NET Cloud SDK, showing you how to apply a footer to the entire presentation or to individual slides.
Prerequisite
- Create an account API credentials
- Download Aspose.Slides Cloud SDK for Dotnet for inserting slides footer
- Set up a C# project with the SDK to add a footer to an entire presentation or a selected slide
Steps to Add PowerPoint Footer with C# Low Code API
- Instantiate the SlidesApi object with the client ID and secret for designing the presentation footer
- Upload the source presentation file to the Cloud storage for setting the footer
- Create an object of the HeaderFooter class and set the desired parameters required for all the slides
- Invoke the SetPresentationHeaderFooter method to set the HeaderFooter object for the entire presentation
- Instantiate another HeaderFooter object and set parameters for the first slide
- Call the SetSlideHeaderFooter() method to set the footer for a specific slide
- Display the footer details and save the resultant presentation when required
The above steps describe how to set headers and footers in PowerPoint with C# .NET-based API. Create the SlidesApi object, upload the input presentation, and create multiple HeaderFooter objects for the entire presentation using the SetPresentationHeaderFooter() method or for selected slides using the SetSlideHeaderFooter() method. You may download the updated presentation and also display details of any footer.
Code for Adding Footer for PowerPoint with C# REST Interface
In summary, this example illustrates how to set a PPTX (or PPT) header and footer using the C# REST API. When you instantiate a HeaderFooter object, it contains no default values—every property is initially NULL. To view the current settings of any HeaderFooter instance, simply call its overloaded ToString() method, which outputs all properties, including IsDateTimeVisible, IsSlideNumberVisible, DateTimeText, and FooterText.
In this guide we’ve shown you how to set the PowerPoint and slides footer programmatically using the C# REST Interface. When you’re ready to transform a presentation into a video, explore our companion tutorial on Convert PowerPoint to Video with C# REST API.