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 PDFs to PowerPoint files.

java
        CPDFConvert cpdfConvertPpt = new CPDFConvertPpt();
        CPDFConvertPPTOptions cpdfConvertPPTOptions = new CPDFConvertPPTOptions();
        cpdfConvertPPTOptions.setContainAnnot(true);
        cpdfConvertPPTOptions.setContainImg(true);
        String inputPath = rootDir + input_file + "powerpoint.pdf";
        List<Integer> pageCounts = getPageCounts(cpdfConvertPpt.getPageCount(inputPath, password));
        ConvertResult convert = cpdfConvertPpt.convert(inputPath, rootDir + output_file, "", cpdfConvertPPTOptions, pageCounts, password, page -> {
        });