In the recent past, we published a blog post that is about how to Render PowerPoint Presentation 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 API installation
- Convert PDF to PPT in C# programmatically
- .NET PDF library - Advance options
PDF to PPT conversion 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.
Convert PDF to PPT 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 and the code snippet mentioned below:
- Load PDF document by initializing an object of the Document class.
- Instantiate an instance of PptxSaveOptions class to access the PDF options.
- Save the output in PPTX format by calling the Save method.
.NET PDF library - Advance 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.
- Create an object of the Document class and load the source PDF file.
- Initialize an instance of PptxSaveOptions class.
- Set the SlidesAsImages property true if you want to convert PDF to PPT with Slides as Images.
- Set the resolution of the image by setting the value of the ImageResolution property.
- If CloseResponse is true the response object will be closed after the document is saved into a response.
- Toggles text columns recognition if OptimizeTextBoxes is true.
- 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:
Get a Free License
You may avail yourself a free temporary license to try the API without evaluation limitations.
That is it! We hope you have found this blog post useful if you are seriously looking to install a PDF to PPT conversion library in your .NET application. 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.