Convert PowerPoint PPT/PPTX to PNG in Node.js

Convert PowerPoint PPT/PPTX to PNG in Node.js

Microsoft PowerPoint is a presentation and slides application that allows you to create slideshow presentations. In certain cases you need to convert PowerPoint PPT or PPTX to PNG format online. For example, you need to show PPT/PPTX presentation in read-only mode within your application or you may need to create the thumbnails for every PowerPoint slide and etc. In this article, we will learn how to convert PowerPoint PPT/PPTX to PNG in Node.js.

The following topics shall be covered in this article:

PowerPoint to Image Converter REST API and Node.js SDK

In this article, we’ll use Node.js SDK of GroupDocs.Conversion Cloud API to convert PPT or PPTX to PNG format in Node.js application. This API allows you to convert your documents to any format you need. It supports the conversion more than 50 types of documents and images such as Word, Excel, PowerPoint, PDF, HTML, JPG, PNG, CAD. It also provides .NET, Java, PHP, Ruby, Android, and Python SDKs as its document conversion family members for the Cloud API.

You can install GroupDocs.Conversion Cloud to your Node.js applications using the following command in the console:

npm install groupdocs-conversion-cloud

Please get your Client ID and Client Secret from the dashboard before you start following the steps and available code examples. Once you have your ID and secret, add in the code as shown below:

How to Convert PowerPoint to PNG Image Online in Node.js

You can convert PowerPoint to PNG image file by following the simple steps given below:

  1. Upload the PowerPoint file to the cloud
  2. Convert PowerPoint to PNG image online free in Node.js
  3. Download the converted PNG file

Upload the Image

Firstly, upload the PowerPoint file to the Cloud using the following code sample:

As a result, the uploaded PowerPoint file will be available in the files section of your dashboard on the cloud.

Convert PowerPoint to PNG Online using Node.js

Please follow the steps mentioned below to convert PowerPoint to PNG file programmatically:

  • Create an instance of ConvertApi
  • Create ConvertSettings instance
  • Set the PowerPoint file path
  • Assign “png” to format
  • Provide output file path
  • Create ConvertDocumentRequest
  • Get results by calling the ConvertApi.convertDocument() method

The following code example shows how to convert PowerPoint to PNG without losing quality using REST API in Node.js:

Download the Converted File

The above code sample will save the converted PowerPoint file on the cloud. You can download it using the following code sample:

Convert PowerPoint to PNG Image using Advanced Options

Please follow the steps mentioned below using PowerPoint to PNG online converter API with some advanced settings:

  • Create an instance of ConvertApi
  • Create ConvertSettings instance
  • Set the PowerPoint file path
  • Assign “png” to format
  • Provide output file path
  • Define PngConvertOptions
  • Set various convert settings such as dpi, imageQuality, height, margins (top, left, right, bottom), etc.
  • Create ConvertDocumentRequest
  • Get results by calling the ConvertApi.convertDocument() method

The following code example shows how to convert PowerPoint to PNG format online with advanced convert options:

Online PowerPoint to PNG Converter

How to convert PowerPoint to image online for free? Please try the following PPTX to PNG Converter which have been developed using the above API.

Conclusion

In this article, you have learned:

  • how to change PPT/PPTX to PNG format on the cloud;
  • how to convert PPT/PPTX to PNG to PNG using advanced options;
  • programmatically upload the file and then download the converted file from the cloud;

You can learn more about GroupDocs.Conversion Cloud API using the documentation. We also provide an API Reference section that lets you visualize and interact with our APIs directly through the browser.

Ask a question

You can ask your queries about PPT/PPTX to PNG converter, via our Free Support Forum

See Also