Package org.docx4j.openpackaging.parts

Examples of org.docx4j.openpackaging.parts.ThemePart.unmarshal()


      // Theme part
      ThemePart themePart = new ThemePart(new PartName("/ppt/theme/theme1.xml"));
      java.io.InputStream is = ResourceUtils.getResourceViaProperty(
          "pptx4j.openpackaging.packages.PresentationMLPackage.DefaultTheme",
            "org/docx4j/openpackaging/parts/PresentationML/theme.xml");
      themePart.unmarshal(is);
     
      // .. add it in 2 places ..
      masterPart.addTargetPart(themePart);
      pp.addTargetPart(themePart);
     
View Full Code Here


    // .. NotesMasterPart typically has a rel to a theme
    // .. can we get away without it?
    // Nope .. read this in from a file
    ThemePart themePart = new ThemePart(new PartName("/ppt/theme/theme2.xml"));
      // TODO: read it from a string instead
    themePart.unmarshal(
        FileUtils.openInputStream(new File(System.getProperty("user.dir") + "/theme2.xml"))
      );   
    nmp.addTargetPart(themePart);
   
    // 2. Notes slide
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.