Search code examples
pdfpowerpointadobe

Adobe PDF to PPT API


Does Adobe provide an official API to convert PDF file to PPT?

https://www.adobe.com/in/acrobat/online/pdf-to-ppt.html

Note: I am only looking for official APIs.


Solution

  • When using the Node.js SDK for Adobe PDF Services API your code might look like this...

    // Create an ExecutionContext using 
    // credentials and create a new 
    // operation instance.
    const executionContext = PDFServicesSdk.ExecutionContext.create(credentials),
    exportPDF = PDFServicesSdk.ExportPDF,
    exportPdfOperation = exportPDF.Operation.createNew(exportPDF.SupportedTargetFormats.PPTX);
    
    // Set operation input from a source file
    const input = PDFServicesSdk.FileRef.createFromLocalFile('resources/exportPDFInput.pdf');
    exportPdfOperation.setInput(input);
    
    // Execute the operation and Save the result to the specified location.
    exportPdfOperation.execute(executionContext)
    .then(result => result.saveAsFile('output/exportPdfOutput.pptx'))