Package org.docx4j.openpackaging.packages

Examples of org.docx4j.openpackaging.packages.PresentationMLPackage.save()


   
      System.out.println("\n Slide " + i);
      convert( presentationMLPackage.getMainPresentationPart().getSlide(i) );
    }

    presentationMLPackage.save(
        new File(System.getProperty("user.dir") + "/OUT_ShapesPresetToCustom.pptx"));
  }
 
  private static void convert(SlidePart slide) throws XPathBinderAssociationIsPartialException, JAXBException {
   
View Full Code Here


    PresentationMLPackage presentationMLPackage =
      (PresentationMLPackage)OpcPackage.load(new java.io.File(inputfilepath));
   
    System.out.println("\n\n saving .. \n\n");
    String outputfilepath = System.getProperty("user.dir") + "/sample-docs/pptx-out.pptx";
    presentationMLPackage.save(new java.io.File(outputfilepath));

    System.out.println("\n\n done .. \n\n");
   
 
}
View Full Code Here

    SlidePart slide2 = presentationMLPackage.createSlidePart(pp, layoutPart,
        new PartName("/ppt/slides/slide2.xml"));
    slide2.getJaxbElement().getCSld().getSpTree().getSpOrGrpSpOrGraphicFrame().add( createGraphicFrameFromString() );
   
    // All done: save it
    presentationMLPackage.save(new java.io.File(outputfilepath));

    System.out.println("\n\n done .. saved " + outputfilepath);
   
 
 
View Full Code Here

    saver.save(baos);
    epp.setBinaryData(baos.toByteArray());

    // Write the new file to disk
    ppt.save(new java.io.File(outputfilepath));

    System.out.println("\n\n done .. saved " + outputfilepath);
  }
}
View Full Code Here

      slidePart.getJaxbElement().getCSld().getSpTree().getSpOrGrpSpOrGraphicFrame().add(sample);
     
      i++;
    }
    // All done: save it
    presentationMLPackage.save(new java.io.File(outputfilepath));

    System.out.println("\n\n done .. saved " + outputfilepath);
   
 
 
View Full Code Here

    // Create and add shape
    Shape sample = ((Shape)XmlUtils.unmarshalString(SAMPLE_SHAPE, Context.jcPML) );
    slidePart.getContents().getCSld().getSpTree().getSpOrGrpSpOrGraphicFrame().add(sample);
   
    // All done: save it
    presentationMLPackage.save(new java.io.File(outputfilepath));

    System.out.println("\n\n done .. saved " + outputfilepath);
   
 
 
View Full Code Here

    nsp.addTargetPart(nmp);
   
   
   
    // All done: save it
    presentationMLPackage.save(new java.io.File(outputfilepath));

    System.out.println("\n\n done .. saved " + outputfilepath);
   
 
 
View Full Code Here

   
    slidePart2.getJaxbElement().getCSld().getSpTree().getSpOrGrpSpOrGraphicFrame().add(
        createPicture(rel.getId()));
   
    // All done: save it
    presentationMLPackage.save(new java.io.File(outputfilepath));

    System.out.println("\n\n done .. saved " + outputfilepath);
   
 
 
View Full Code Here

    mpp.removeSlide(rel);
   
   
    System.out.println("\n\n saving .. \n\n");
    String outputfilepath = System.getProperty("user.dir") + "/pptx-out.pptx";
    presentationMLPackage.save(new java.io.File(outputfilepath));

    System.out.println("\n\n done .. \n\n");
   
 
}
View Full Code Here

    SlidePart slide2 = presentationMLPackage.createSlidePart(pp, layoutPart,
        new PartName("/ppt/slides/slide2.xml"));
    slide2.getJaxbElement().getCSld().getSpTree().getSpOrGrpSpOrGraphicFrame().add( createGraphicFrameFromString() );
   
    // All done: save it
    presentationMLPackage.save(new java.io.File(outputfilepath));

    System.out.println("\n\n done .. saved " + outputfilepath);
   
 
 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.