You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1.) I don't think it saves a lot of space to remove unpopulated shapes. As I create my pptx-files completly inside a script, its already reproducible and easy to copy formats. So I don't need the unpopulated shapes. So far I had no issues with removing them. On the other hand, when you want to change an existing pptx, the default shapes can help to identify parts in a presentation. Also, if you want to insert a slide from one presentation in another with different master layout, the layout would automatically fit correctly, because PowerPoint knows about its default shapes. Provided, the creator of the pptx-file used them properly, and the same is true for the template-file. So far I haven't seen anyone, who truly uses them in the way they are meant to.
2.) comtype is just a remote control for PowerPoint. So the question is, are there ways inside PowerPoint to reduce the file size? There might be some image compression settings. But if you use a script to place images in a pptx, it might be easier to compress them before putting them in a pptx.
4.) Not sure what was the idea behind this. The way it is implemented right now seems to works for all those visible empty shapes.
@natter1
# if shape.is_placeholder and shape.text_frame.text == "":
is commented in remove_unpopulated_shapes. Can we use this lineThe text was updated successfully, but these errors were encountered: