Package org.docx4j.openpackaging.parts.WordprocessingML

Examples of org.docx4j.openpackaging.parts.WordprocessingML.MainDocumentPart.addTargetPart()


      ((org.docx4j.openpackaging.parts.WordprocessingML.StyleDefinitionsPart) stylesPart)
          .unmarshalDefaultStyles();
     
      // Add the styles part to the main document part relationships
      // (creating it if necessary)
      wordDocumentPart.addTargetPart(stylesPart); // NB - add it to main doc part, not package!     
     
    } catch (Exception e) {
      // TODO: handle exception
      //e.printStackTrace(); 
      log.error(e.getMessage(), e);
View Full Code Here


     
      // Numbering
      try {
        NumberingDefinitionsPart ndp = new NumberingDefinitionsPart();
        ndp.setJaxbElement(transitionContainer.getNumbering());
        mdp.addTargetPart(ndp);
       
        // fix attributes
        // <w:multiLevelType w:val="Multilevel"/> should start with lower case
        for (AbstractNum anum : ndp.getJaxbElement().getAbstractNum()) {
          if (anum.getMultiLevelType()==null) continue;
View Full Code Here

      // Fonts
      try {
        FontTablePart fontsPart = new FontTablePart();
        fontsPart.setJaxbElement(transitionContainer.getFonts());
               
        mdp.addTargetPart(fontsPart);
      } catch (InvalidFormatException e) {}
    }
   
    return wordMLPackage;
   
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.