Package org.docx4j.openpackaging.parts.PresentationML

Examples of org.docx4j.openpackaging.parts.PresentationML.MainPresentationPart


    String inputfilepath = "data/pptx4j/presentation.pptx";
   
    PresentationMLPackage presentationMLPackage =
      (PresentationMLPackage)OpcPackage.load(new java.io.File(inputfilepath));
   
    MainPresentationPart mpp = presentationMLPackage.getMainPresentationPart();
   
    //mpp.removeSlide(10);
    Relationship rel = mpp.getRelationshipsPart().getRelationshipByID("rId2");
    mpp.removeSlide(rel);
   
    System.out.println("\n\n saving .. \n\n");
    String outputfilepath = "data/pptx4j/RemovedSlide-Pptx4j.pptx";
    presentationMLPackage.save(new java.io.File(outputfilepath));
View Full Code Here


   
    // Need references to these parts to create a slide
    // Please note that these parts *already exist* - they are
    // created by createPackage() above.  See that method
    // for instruction on how to create and add a part.
    MainPresentationPart pp = (MainPresentationPart)presentationMLPackage.getParts().getParts().get(
        new PartName("/ppt/presentation.xml"));   
    SlideLayoutPart layoutPart = (SlideLayoutPart)presentationMLPackage.getParts().getParts().get(
        new PartName("/ppt/slideLayouts/slideLayout1.xml"));
   
    // OK, now we can create a slide
View Full Code Here

TOP

Related Classes of org.docx4j.openpackaging.parts.PresentationML.MainPresentationPart

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.