Package org.docx4j.openpackaging.packages

Examples of org.docx4j.openpackaging.packages.WordprocessingMLPackage$FilterSettings


      execute( wordMLPackage);
  }

  public static void notWrappedBottomMarginArea(String[] args) throws Exception {
   
      WordprocessingMLPackage wordMLPackage = createTextBoxDocx(true, "position:absolute;margin-left:0;margin-top:0;width:186pt;height:110.25pt;z-index:-251657216;visibility:visible;mso-wrap-style:square;mso-width-percent:400;mso-height-percent:200;mso-wrap-distance-left:9pt;mso-wrap-distance-top:0;mso-wrap-distance-right:9pt;mso-wrap-distance-bottom:0;mso-position-horizontal:center;mso-position-horizontal-relative:text;mso-position-vertical:bottom;mso-position-vertical-relative:bottom-margin-area;mso-width-percent:400;mso-height-percent:200;mso-width-relative:margin;mso-height-relative:margin;v-text-anchor:top"  );
      execute( wordMLPackage);
  }
View Full Code Here


      execute( wordMLPackage);
  }
 
  public static void notWrappedTopMarginArea(String[] args) throws Exception {
         
      WordprocessingMLPackage wordMLPackage = createTextBoxDocx(true, "position:absolute;margin-left:0;margin-top:0;width:186pt;height:110.25pt;z-index:-251657216;visibility:visible;mso-wrap-style:square;mso-width-percent:400;mso-height-percent:200;mso-wrap-distance-left:9pt;mso-wrap-distance-top:0;mso-wrap-distance-right:9pt;mso-wrap-distance-bottom:0;mso-position-horizontal:center;mso-position-horizontal-relative:text;mso-position-vertical:top;mso-position-vertical-relative:top-margin-area;mso-width-percent:400;mso-height-percent:200;mso-width-relative:margin;mso-height-relative:margin;v-text-anchor:top"  );
      execute( wordMLPackage);
  }
View Full Code Here

      execute( wordMLPackage);
  }
 
  public static void notWrappedRelPara(String[] args) throws Exception {
     
      WordprocessingMLPackage wordMLPackage = createTextBoxDocx(true, "position:absolute;margin-left:0;margin-top:0;width:186.95pt;height:110.55pt;z-index:251658240;visibility:visible;mso-wrap-style:square;mso-width-percent:0;mso-height-percent:0;mso-wrap-distance-left:9pt;mso-wrap-distance-top:0;mso-wrap-distance-right:9pt;mso-wrap-distance-bottom:0;mso-position-horizontal:absolute;mso-position-horizontal-relative:text;mso-position-vertical:absolute;mso-position-vertical-relative:text;mso-width-percent:0;mso-height-percent:0;mso-width-relative:page;mso-height-relative:page;v-text-anchor:top" );
      execute( wordMLPackage);
  }
View Full Code Here

 
  public static void wrappedLeft(String[] args) throws Exception {

    // margin top > 0 ; margin left = 0
     
      WordprocessingMLPackage wordMLPackage = createTextBoxDocx(false, "position:absolute;margin-left:0;margin-top:72.05pt;width:186.95pt;height:110.55pt;z-index:-251658240;visibility:visible;mso-wrap-style:square;mso-width-percent:0;mso-height-percent:0;mso-wrap-distance-left:9pt;mso-wrap-distance-top:0;mso-wrap-distance-right:9pt;mso-wrap-distance-bottom:0;mso-position-horizontal:absolute;mso-position-horizontal-relative:text;mso-position-vertical:absolute;" +
          "mso-position-vertical-relative:text;mso-width-percent:0;mso-height-percent:0;mso-width-relative:page;mso-height-relative:page;v-text-anchor:top" );
      execute( wordMLPackage);
  }
View Full Code Here

    // margin-left:108pt
    // mso-position-horizontal:absolute <------------
    // mso-position-horizontal-relative:text
      // mso-wrap-style:square
    WordprocessingMLPackage wordMLPackage = createTextBoxDocx(false, "position:absolute;margin-left:50pt;margin-top:0;width:186.95pt;height:110.55pt;z-index:251659264;visibility:visible;mso-wrap-style:square;mso-width-percent:400;mso-height-percent:200;mso-wrap-distance-left:9pt;mso-wrap-distance-top:0;mso-wrap-distance-right:9pt;mso-wrap-distance-bottom:0;" +
            "mso-position-horizontal:absolute;mso-position-horizontal-relative:text;mso-position-vertical:absolute;mso-position-vertical-relative:text;mso-width-percent:400;mso-height-percent:200;mso-width-relative:margin;mso-height-relative:margin;v-text-anchor:top");
    execute( wordMLPackage);
  }
View Full Code Here

  public static void wrappedAboveAndLeft(String[] args) throws Exception {
   
         
    // Alignment LEFT
   
    WordprocessingMLPackage wordMLPackage = createTextBoxDocx(false, "position:absolute;margin-left:0;margin-top:0;width:186.95pt;height:110.55pt;z-index:251659264;visibility:visible;mso-wrap-style:square;mso-width-percent:400;mso-height-percent:200;mso-wrap-distance-left:9pt;mso-wrap-distance-top:0;mso-wrap-distance-right:9pt;mso-wrap-distance-bottom:0;" +
        "mso-position-horizontal:left;mso-position-horizontal-relative:text;mso-position-vertical:absolute;mso-position-vertical-relative:text;mso-width-percent:400;mso-height-percent:200;mso-width-relative:margin;mso-height-relative:margin;v-text-anchor:top");
     
      execute( wordMLPackage);
  }
View Full Code Here

   
    //  mso-wrap-style:square
    //  mso-position-vertical:absolute
    //  mso-position-vertical-relative:text
    //  v-text-anchor:top",
    WordprocessingMLPackage wordMLPackage = createTextBoxDocx(false, "position:absolute;margin-left:0;margin-top:0;width:186.95pt;height:110.55pt;z-index:251659264;visibility:visible;mso-wrap-style:square;mso-width-percent:400;mso-height-percent:200;mso-wrap-distance-left:9pt;mso-wrap-distance-top:0;mso-wrap-distance-right:9pt;mso-wrap-distance-bottom:0;mso-position-horizontal:center;mso-position-horizontal-relative:text;mso-position-vertical:absolute;mso-position-vertical-relative:text;mso-width-percent:400;mso-height-percent:200;mso-width-relative:margin;mso-height-relative:margin;v-text-anchor:top");
     
      execute( wordMLPackage);
  }
View Full Code Here

    // margin-left:135.75pt
    // mso-position-horizontal:right <---------
    // mso-position-horizontal-relative:text
    // mso-wrap-style:square

    WordprocessingMLPackage wordMLPackage = createTextBoxDocx(false, "position:absolute;margin-left:135.75pt;margin-top:0;width:186.95pt;height:110.55pt;z-index:251659264;visibility:visible;mso-wrap-style:square;mso-width-percent:400;mso-height-percent:200;mso-wrap-distance-left:9pt;mso-wrap-distance-top:0;mso-wrap-distance-right:9pt;mso-wrap-distance-bottom:0;mso-position-horizontal:right;mso-position-horizontal-relative:text;mso-position-vertical:absolute;mso-position-vertical-relative:text;mso-width-percent:400;mso-height-percent:200;mso-width-relative:margin;mso-height-relative:margin;v-text-anchor:top");
      execute( wordMLPackage);
  }
View Full Code Here

    // speedup
//    String regex = ".*(calibri|cour|arial|times|comic|georgia|impact|LSANS|pala|tahoma|trebuc|verdana|symbol|webdings|wingding).*";
    String regex = ".*(calibri|cour|arial).*";
    PhysicalFonts.setRegex(regex);   

    WordprocessingMLPackage wordMLPackage = WordprocessingMLPackage.createPackage();
    MainDocumentPart mdp = wordMLPackage.getMainDocumentPart();
   
      P p = new P();
      mdp.getContent().add(p);
     
      R r = Context.getWmlObjectFactory().createR();
View Full Code Here

  }

  @Test
  public void testTblStyle_AllSilent() throws Exception {
 
    WordprocessingMLPackage wordMLPackage = WordprocessingMLPackage.createPackage();
    wordMLPackage.getMainDocumentPart().setContents(
        (Document)XmlUtils.unmarshalString(mdpXml_tblStyle) );
    wordMLPackage.getMainDocumentPart().getStyleDefinitionsPart().setContents(
        (Styles)XmlUtils.unmarshalString(styles_no_font_sz) );
   
    // NB createVirtualStylesForDocDefaults() puts 10pt there, if nothing is specified!
    // So we need to delete that!
    wordMLPackage.getMainDocumentPart().getStyleDefinitionsPart().createVirtualStylesForDocDefaults();
    Style dd = wordMLPackage.getMainDocumentPart().getStyleDefinitionsPart().getStyleById("DocDefaults");
    dd.getRPr().setSz(null);
    dd.getRPr().setSzCs(null);
   
    setSetting(wordMLPackage, OVERRIDE)// table style should get overridden
 
    wordMLPackage.save(new File(System.getProperty("user.dir") + "/OUT_PStyleInTableTest.docx"));
   
    ParagraphStylesInTableFix.process(wordMLPackage);
   
    Style s = getStyle(wordMLPackage, STYLE_NAME);
    Assert.assertTrue(s.getRPr().getSz().getVal().intValue()==40);
View Full Code Here

TOP

Related Classes of org.docx4j.openpackaging.packages.WordprocessingMLPackage$FilterSettings

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.