com.aspose.slides

Interfaces

Classes

Exceptions

com.aspose.slides

Class ForEach

  • java.lang.Object
    • com.aspose.slides.ForEach


  • public class ForEach
    extends java.lang.Object

    Represents a group of methods intended to iterate over different Presentation model objects. These methods can be useful if you need to iterate and change some Presentation' elements formatting or content, e.g. change each portion formatting.


     
     Presentation pres = new Presentation("pres.pptx");
     try {
         ForEach.portion(pres, (portion, para, slide, index) ->
             portion.getPortionFormat().setLatinFont(new FontData("Times New Roman")));
    
         pres.save("pres-out.pptx", SaveFormat.Pptx);
     } finally {
         if (pres != null) pres.dispose();
     }