java - apache poi not updating ppt file with HSLF component -


i removing slides ppt file using apache poi.

hslfslideshow slideshow = new hslfslideshow(new hslfslideshowimpl(dir)); (int = 0; < 5; i++) {     slideshow.removeslide(0); } 

i printed slides , saw first 5 slides gone. when opened ppt file, nothing has changed. first 5 slides still there. should do?

when you're done making changes, need write them out them saved! method write(outputstream) across formats, javadocs hslf write method here

so, change code this:

hslfslideshow slideshow = new hslfslideshow(new hslfslideshowimpl(dir)); (int = 0; < 5; i++) {     slideshow.removeslide(0); } fileoutputstream out = new fileoutputstream("changed.ppt"); slideshow.write(out); out.close(); 

there's no in-place saving support in hslf, , no volunteer add it, you'll have save out different file 1 opened from