Package org.docx4j.openpackaging.parts.PresentationML

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


   */
  public static NotesSlidePart createNotesSlidePart(Part sourcePart, PartName partName) throws Exception {

        String proposedRelId = sourcePart.getRelationshipsPart().getNextId();

        NotesSlidePart notesSlidePart = new NotesSlidePart(partName);

        notesSlidePart.getSourceRelationships().add(sourcePart.addTargetPart(notesSlidePart, proposedRelId));
        notesSlidePart.setJaxbElement(NotesSlidePart.createNotes());

        return notesSlidePart;

    }
View Full Code Here


        FileUtils.openInputStream(new File(System.getProperty("user.dir") + "/theme2.xml"))
      );   
    nmp.addTargetPart(themePart);
   
    // 2. Notes slide
    NotesSlidePart nsp = new NotesSlidePart();
    Notes notes = (Notes)XmlUtils.unmarshalString(notesXML, Context.jcPML);
    nsp.setJaxbElement(notes);
    // .. connect it to the slide
    slidePart.addTargetPart(nsp);
    // .. it also has a rel to the slide
    nsp.addTargetPart(slidePart);
    // .. and the slide master
    nsp.addTargetPart(nmp);
   
   
   
    // All done: save it
    presentationMLPackage.save(new java.io.File(outputfilepath));
View Full Code Here

TOP

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

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.