Is there a way to export PPT as a PDF file/PPTX file from powerpoint add-in taskpane ?

Eldhose Peter 6 Reputation points
2022-11-21T10:08:34.87+00:00

I would like to export the current PowerPoint Presentation as a PDF file/PPTX file from the add-in taskpane to local machine.
Is there any Javascript API that would help me with this ?

Office Development
Office Development
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Development: The process of researching, productizing, and refining new or existing technologies.
3,488 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Eldhose Peter 6 Reputation points
    2022-11-24T09:30:47.52+00:00

    I have found a way.

    1. Using the getFileAsync(fileType, options, callback) method you will get a byte array for the file format(PDF,compressed,text) specified by you in the options.
    2. Convert byte array to base64 encoding.
    3. Write the base64 encoded bytes to the respective file type in local system in base64 format.

    This worked for me.

    0 comments No comments