The steps given below provide the details on how to convert PPT file to JPG format using Aspose.Slides Cloud SDK for Python.
We recommend visiting the following blog post for information on how to Convert PPT to JPG using Python.
The steps given below provide the details on how to convert PPT file to JPG format using Aspose.Slides Cloud SDK for Python.
We recommend visiting the following blog post for information on how to Convert PPT to JPG using Python.
This Gist contains code snippets to convert PPT to JPEG using Aspose.Slides Cloud SDK for Python |
def PPT2JPG(): | |
try: | |
# initialize Aspose.Slides Cloud instance. | |
configuration = asposeslidescloud.Configuration() | |
configuration.app_sid = "bbf94a2c-6d7e-4020-b4d2-b9809741374e" | |
configuration.app_key = "1c9379bb7d701c26cc87e741a29987bb" | |
slidesApi = asposeslidescloud.SlidesApi(configuration) | |
# load PPT file from local drive into Stream instance | |
fileName = "/Users/shahbnay/Downloads/test-unprotected.ppt" | |
with open(fileName, 'rb') as f: | |
file = f.read() | |
# call the API to convert PPT to JPG format and save the output to Cloud storage | |
request = slidesApi.save_slide_online(file,slide_index=1,format=asposeslidescloud.models.ExportFormat.JPEG, | |
out_path="Converted.jpeg",width=800,height=1000) | |
# print result in console | |
print("Result {0}".format(request)) | |
except ApiException as e: | |
print("Exception while calling SlidesApi: {0}".format(e)) |