Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
This Gist contains code snippets related to PPT Merge and Split operations using Python Cloud SDK

This gist explains the steps and code snippet on how to Merge multiple PowerPoint presentations together or split an existing PowerPoint presentation to individual files using Aspose.Slides Cloud SDK for Python.

For more information, please visit

# Get ClientID and ClientSecret from https://dashboard.aspose.cloud/
configuration = asposeslidescloud.Configuration()
configuration.app_sid = "718e4235-8866-4ebe-bff4-f5a14a4b6466"
configuration.app_key = "388e864b819d8b067a8b1cb625a2ea8e"
# initialize an object of SlidesApi
slidesApi = asposeslidescloud.SlidesApi(configuration)
try:
# input PPT file
sourcePPT = "input.pptx"
# first PPTX to be merged
toMergePPT1 = "Presentation1.pptx"
# second PPT to be merged
toMergePPT2 = "test-unprotected.ppt"
# create list of PPT files to be merged
mergeList = asposeslidescloud.models.PresentationsMergeRequest([toMergePPT1,toMergePPT2], None)
# the PPT files will be merge in the sequence they are provided in mergeList
request = asposeslidescloud.models.requests.PostPresentationMergeRequest(sourcePPT, mergeList, None, None,None)
# finally call the method to perform the merge operation
response = slidesApi.post_presentation_merge(request)
# print the API response
print("Result {0}".format(response))
# Get ClientID and ClientSecret from https://dashboard.aspose.cloud/
configuration = asposeslidescloud.Configuration()
configuration.app_sid = "718e4235-8866-4ebe-bff4-f5a14a4b6466"
configuration.app_key = "388e864b819d8b067a8b1cb625a2ea8e"
# initialize an object of SlidesApi
slidesApi = asposeslidescloud.SlidesApi(configuration)
try:
# input PPT file
sourcePPT = "test-unprotected.ppt"
# Split PPT from slide 2 to 3
request = asposeslidescloud.models.requests.PostSlidesSplitRequest(sourcePPT, None, "pptx", None, None, 2, 3, None, None, None, None, None)
# call the method to split the PPT
response = slidesApi.post_slides_split(request)
# print response of split operation
print("Result {0}".format(response))
This Gist contains code snippets related to PPT Merge and Split operations using Aspose.Slides Cloud SDK for Python
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment