Convert PDF to PPT in C#

Convert PDF to PPT in C#

In the recent past, we published a blog post that is about how to Render PowerPoint Presentations using C#. We also demonstrated how to convert PowerPoint Slides to JPG images. However, in this blog post, we will learn how to convert PDF to PPT in C# programmatically. We will use this .NET PDF library to achieve this conversion as it offers methods and properties to manipulate & convert PDF files. Both of these file formats are popular due to their competent features.

The following sections will be covered in this article:

PDF to PPT Conversion - C# API Installation

We will use this .NET PDF library to equip our .NET application with a PDF to PPT converter. It is lightweight, easy to install and offers comprehensive documentation regarding usage and installation.

However, you may either download the DLL files or run the following command in the NuGet package manager.

Install-Package Aspose.PDF

Convert PDF to PPT Presentation in C# Programmatically

So far, we have installed the library and are ready to write code in C#. We will see how easy is to convert PDF to PPT programmatically in a .NET application.

You can follow the steps mentioned below:

  1. Load the PDF document by initializing an object of the Document class.
  2. Instantiate an instance of PptxSaveOptions class to access the PDF options.
  3. Save the output in PPTX format by calling the Save method.

The following code snippet shows how to convert PDF to PPT Presentation in C#:

PDF to PowerPoint Slides - Advanced Options

This .NET PDF library offers a huge stack of features that you may check here. However, let’s explore some advanced features offered by this API by following the steps.

  1. Create an object of the Document class and load the source PDF file.
  2. Initialize an instance of the PptxSaveOptions class.
  3. Set the SlidesAsImages property to true if you want to convert PDF to PPT with Slides as Images.
  4. Set the resolution of the image by setting the value of the ImageResolution property.
  5. If CloseResponse is true the response object will be closed after the document is saved into a response.
  6. Toggles text column recognition if OptimizeTextBoxes is true.
  7. Save the output in PPTX format by invoking the Save method.

You can see the output of the above code snippet in the image below:

PDF to PPT in C#

Get a Free License

You may avail yourself of a free temporary license to try the API without evaluation limitations.

Summing up

That is it! We hope you have found this blog post useful if you are seriously looking to install a PDF to PPT Presentation conversion in C#. Moreover, we have gone through how to convert PDF to PPT in C# programmatically. In addition, we also have explored some advanced features of this .NET PDF library. However, do not skip the documentation to know about the other methods and properties. Further, conholdate.com is writing new blog posts on new topics. Therefore, please stay in touch for regular updates.

Ask a question

You can let us know about your questions or queries on our forum.

See Also