Use Picture as Background in PowerPoint with C# REST API

Follow this article to use picture as background in PowerPoint with C# REST API. You will learn to change background design in PowerPoint with C# REST Interface using .NET-based Cloud SDK. Various options are discussed to customize the background image in the slide.

Prerequisite

Steps to Set PowerPoint Backgrounds with C# Low Code API

  1. Create the SlidesApi object for setting the background of a slide
  2. Upload the source PowerPoint presentation into the Cloud storage with a unique name
  3. Read the image file data into a byte array and convert it to a base 64 string
  4. Create the SlideBackground object and set the fill format for setting background image parameters
  5. Call the SetBackground() method to set the PowerPoint slide background
  6. Download the updated PowerPoint presentation after setting the background

These steps explain how to set the background for PowerPoint presentation with C# .NET-based API. Create the SlidesApi object, upload the presentation to the Cloud storage, read the image data, convert it to a base 64 string, and use it in the SlideBackground object for setting the FillFormat. Finally, call the SetBackground() method to add the image as background and download the output file on the disk.

Code to Add PPT background with C# Low Code API

This code has demonstrated how to set the background for presentation slide with C# Low Code API. You may set various properties of the image including picture fill mode, glow, inner shadow, outer shadow, soft edge, and reflection. Provide the password for the uploaded PowerPoint presentation if it is protected.

This article has taught us to set background images for PPT with C# REST Interface. If you want to copy slides within a presentation or to another presentation, refer to the article Copy PowerPoint Slide with C# REST API.