Skip to content
Guides

Convert PDF to PowerPoint

Overview

ComPDFKit Conversion SDK provides the function of converting PDF files to PowerPoint files and restoring the layout and format of the original document, which can meet the needs of users for the presentation and editing of document content in Microsoft PowerPoint.

Sample

This sample demonstrates how to convert from a PDF to PPTX file.

c#
string inputFilePath = "***";
string outputFolderPath = "***";
string outputFileName = "***";

CPDFConverterPPT converter = CPDFConvertFactroy.CreateConverter(CPDFConvertType.CPDFConvertTypePPT, inputFilePath) as CPDFConverterPPT;

CPDFConvertPPTOptions pptOptions = new CPDFConvertPPTOptions();
pptOptions.IsAllowOCR = false;
pptOptions.IsContainAnnotations = true;
pptOptions.IsContainImages = true;

int pageCount = converter.GetPagesCount();
int[] pageArray = new int[pageCount];
for (int i = 0; i < pageArray.Length; i++)
{
    pageArray[i] = i + 1;
}

ConvertError error = ConvertError.ERR_UNKNOWN;
converter.Convert(outputFolderPath, ref outputFileName,pptOptions, pageArray, ref error, getPorgress);