Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove_unpopulated_shapes is it good to use #6

Open
NarenZen opened this issue Apr 9, 2021 · 1 comment
Open

remove_unpopulated_shapes is it good to use #6

NarenZen opened this issue Apr 9, 2021 · 1 comment

Comments

@NarenZen
Copy link

NarenZen commented Apr 9, 2021

@natter1

  1. ReadMe says further testing is needed for remove_unpopulated_shapes. Are we good to use it. Is there any possible issues that can occur
  2. Is there any functions or comtype function in the repo other than remove_unpopulated_shapes to optimize the file size of the pptx
  3. Does remove_unpopulated_shapes uses any comtype function to optimize the file size of the pptx
  4. this line # if shape.is_placeholder and shape.text_frame.text == "": is commented in remove_unpopulated_shapes. Can we use this line
@natter1
Copy link
Owner

natter1 commented Apr 10, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants