Item1 = groupdocs_merger_cloud.JoinItem() Response_upload2 = file_api.upload_file(request_upload2) Request_upload2 = groupdocs_merger_cloud.UploadFileRequest(remote_name2,filename2) Response_upload1 = file_api.upload_file(request_upload1) Request_upload1 = groupdocs_merger_cloud.UploadFileRequest(remote_name1,filename1) Remote_name2 = 'slides/three-slides.pptx' # Get your client Id and Secret at (free registration is required).Ĭlientid = "xxxxx-xxxx-xxxx-xxxx-xxxxxxxx"Ĭlientsecret = "xxxxxxxxxxxxxxxxxxxxxxxxx"ĭocumentApi = groupdocs_merger_keys(clientid, clientsecret)įile_api = groupdocs_merger_keys(clientid, clientsecret) P.S: I'm a developer evangelist at GroupDocs. However, we have a plan to combine files from the request body(stream) in near future. Currently, it combines the files from Cloud storage(GroupDocs internal storage, Amazon S3, DropBox, Google Drive Storage, Google Cloud Storage, Windows Azure Storage and FTP Storage.). It is a REST API solution without the dependency of any third party app/tool. The expected result is two separate slides merge into one slide.Īnother solution to combine PowerPoint Presentations in python is GroupDocs.Merger Cloud SDK for Python. Raise ValueError("%s is not in slide collection" % slide) ![]() I get the error: Traceback (most recent call last):įile "C:\Users\I505168\Desktop\testpptx.py", line 12, in įile "C:\Users\I505168\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pptx\slide.py", line 315, in index Prs1.save("C:/Users/I505168/Documents/newpresentation.pptx") Slide.shapes._spTree.insert_element_before(shape.element, 'p:extLst') Slidelst.append(_slide(layout))įor shape in : ![]() Prs2 = Presentation("C:/Users/number/Documents/Test2.pptx") Prs1 = Presentation("C:/Users/number/Documents/Test1.pptx") Here is my code: from pptx import Presentation I tried doing something similar but that isn't working. ![]() I looked at the python-pptx example on Python-pptx: copy slide. But I ran into many issues like how to grab the existing slides layout or shape (all shapes including pictures, auto shapes, and more) height, width, position. I tried copying the slide contents from 2 powerpoints to one new power point. I found a python moduel pptx that looked promising. I am trying to combine powerpoint slides and I am not sure how to do it.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |