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 JPEG image format. 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 order to automate PowerPoint to JPG conversion, I’ll demonstrate how to convert PowerPoint PPT/PPTX to JPG/JPEG images in Python.
The following topics shall be covered in this article:
- Convert PowerPoint PPT or PPTX to JPG/JPEG REST API - Installation
- How to Convert PowerPoint PPT/PPTX to JPG/JPEG file in Python
Convert PowerPoint PPT or PPTX to JPG/JPEG REST API - Installation{#Convert-PowerPoint-PPT-or-PPTX-to-JPG/JPEG-REST-API—Installation}
In order to convert PPT(X) to JPG/JPEG images in Python, we will be using the Python SDK of GroupDocs.Conversion Cloud API. Python SDK of GroupDocs.Conversion provides the best way to convert PowerPoint PPT to JPG files in seconds. It is 100% free, secure and easy to use Python SDK for files conversion. It allows converting documents of supported formats to image programmatically on the cloud. You can install it using the following command in the console:
pip install groupdocs_conversion_cloud
Firstly, get your Client ID and Secret from the dashboard before following the below mentioned steps. Once you have your ID and secret, add below code in your application as shown below:
How to Convert PowerPoint PPT/PPTX to JPG/JPEG file in Python
You can convert BMP image to PDF file by following the simple steps mentioned below:
- Upload the PPT/PPTX file to the Cloud
- Convert PPT/PPTX to JPG/JPEG in Python
- Download the converted file
Upload the Document
Firstly, upload the PPT or PPTX file to the cloud using the code example given below:
As a result, the uploaded PPT/PPTX file will be available in the files section of your dashboard on the cloud.
Convert PPT or PPTX to JPG/JPEG in Python
You can convert convert ppt to jpg with high resolution or jpeg format programmatically by following the steps given below:
- Firstly, create an instance of the ConvertApi
- Next, create an instance of the ConvertSettings
- Then, set the storage name and PowerPoint file path
- Set resultant image file format as “jpeg”
- Create an instance of the JpegConvertOptions
- Define the grayscale, from_page, pages_count, quality, rotate_angle and use_pdf etc
- Set convertOptions to settings
- Now, provide the output file path
- After that, create ConvertDocumentRequest with ConvertSettings as argument
- Finally, call the ConvertApi.convert_document() method with ConvertDocumentRequest to save the converted file
The following example code demonstrate how to convert PPTX to JPEG file format using REST API in Python:
The above code sample will save the converted JPEG file on the cloud.
Download the Converted File
The above code sample will save the converted powerpoint to jpg high resolution file on the cloud. You can download it using the following code sample:
PowerPoint to JPG Converter Online Free
How to convert pptx to jpg online? Please try the following ppt to jpg converter free tool to convert ppt to jpg online, which is developed using the above API.
Conclusion
In this article, we have learned how to convert PowerPoint to JPG/JPEG formats on the cloud. Now you know:
- how to convert PowerPoint slide to jpg or jpeg in Python;
- programmatically upload the PowerPoint file to the cloud;
- how to download the converted file from the cloud;
- how to convert pptx to jpg free using online tool;
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
If you have any questions about PowerPoint to JPG or JPEG converter**, please feel free to ask us on the Free Support Forum.