You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Ghazi TRIKI <gh...@gmail.com> on 2017/01/26 08:54:25 UTC

PowerPoint PPTX - Completely delete an image from a background and replace it if possible

Hello,

I have file in the link below and I am trying to do the following things:
1- Delete the image from the PPTX archive. I am able to do it using "pptx.getPackage().removePart(pic.getPackagePart());" after using "pptx.findPictureData".
2- The second part is more complex, I want to remove all relationships of this image in powerpoint. Where should I look? How should I do it?
3- Add a new background to the master that has that image in the background if possible.

The issue I am having whe doing "pptx.getPackagePart().removeRelationship(relation.getRelationship().getId());" the powerpoint file could not be properly opened.

Any help please?

https://www.dropbox.com/s/04ngzf6zkfzorj7/bg_sample.pptx?dl=0

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org