This quick tutorial describes the process of how to export PDF to PowerPoint using C#. It shares details about setting the environment, a list of tasks for writing the program, and a ready-to-run sample code demonstrating the conversion from PDF to PowerPoint using C#. You will learn different options to customize the PDF loading and PPTX saving process.
Steps to Convert PDF to PowerPoint using C#
- Create the environment to use Aspose.PDF for .NET for generating a presentation from a PDF
- Load the source PDF into the Document class object that is to be transformed to a PPTX
- Instantiate a PptxSaveOptions class object for setting properties of the output PPTX file
- Set the flag to generate slides as images
- Save the loaded PDF file as a PPTX using the above configuration
These steps define the process of importing PDF into PowerPoint using C#. The process is quite simple where the PDF file is loaded into the Document class object followed by the initiation of the PptxSaveOptions object for controlling the generation of the output PPTX file like the slides are created as images. In the final step, the PDF is saved as PPTX using the custom options set in the PptxSaveOptions object.
Code to Convert PDF to PPTX using C#
This code can be used to create a basic application to turn PDF to PowerPoint using C#. Although the simple constructor of the Document class is used that takes the source PDF file name only however you may use other constructors for setting the password for the protected PDF files, loading the file from a stream, or manipulating the PDF file after loading it. Similarly, you may set image resolution, change the output format using the SaveFormat enumerator, and set a warning handler for the conversion.
This article has guided us to convert PDF to PowerPoint presentation using C#. If you want to learn the process to convert PDF to image, refer to the article on how to convert PDF to image in C#.