Convert a PowerPoint to PDF with C# REST API

Follow this article to convert a PowerPoint to PDF with C# REST API. You will learn to transform PowerPoint as PDF with C# REST Interface using .NET-based Cloud SDK. Different properties and attributes are discussed to customize the conversion process.

Prerequisite

Steps to Convert PowerPoint File to PDF with C# .NET-based API

  1. Create the SlidesApi object with the Client ID and secret to convert PPTX to PDF
  2. Load the input presentation file into the FileStream object
  3. Define the export format as PDF and create a list of slides for conversion to PDF
  4. Call the Convert() method and provide the FileStream, export format, and slides array
  5. Create the output file stream and save the resultant stream as PDF

These steps explain how to convert a PowerPoint presentation to PDF with C# RESTful Service. Create the SlidesApi object, load the presentation file into the File stream, define the output file format, create a list of slides for rendering to PDF, and call the Convert() method using all these parameters. Save the output stream from the API call and save it on the disk.

Code to Convert PowerPoint Presentation to PDF with C# REST API

This code demonstrates how to save PowerPoint to PDF with C# Low Code API. The Export format contains many other formats including PPS, PPSX, PPTM, PPSM, SWF, etc. You can set any order of slides in the array irrespective of the original order in the source presentation.

This article has taught us how to export slides to PDF. To create a presentation from scratch, refer to the article on Create presentation with C# REST API.