Package org.docx4j.wml.SectPr

Examples of org.docx4j.wml.SectPr.PgSz


              // content before the continuous sectPr,
              // or that need to get inherited by the section after the continuous sectPr
              previousHF = new HeaderFooterPolicy(ppr.getSectPr(), previousHF, rels, evenAndOddHeaders);

             
              PgSz pgSzThis = ppr.getSectPr().getPgSz();
              PgSz pgSzNext = followingSectPr.getPgSz();
              if (insertPageBreak( pgSzThis,  pgSzNext)) {
               
                ppr.setPageBreakBefore(new BooleanDefaultTrue());
              }
              //ppr.setSectPr(null); // Don't do this, since we have to process the docx (inc sectPrs) multiple times for a single PDF output
View Full Code Here


    String styleRelId = wordMLPackage.getMainDocumentPart().addTargetPart(style).getId();

    // Occupy entire page, less margins
    PageDimensions pd = new PageDimensions();
    pd.setPgSize(sz, landscape );
    PgSz pgSz = pd.getPgSz();
    pd.setMargins(margins);
    String cx =  ""+UnitsOfMeasurement.twipToEMU(pgSz.getW().intValue()
        - (pd.getPgMar().getLeft().intValue()+pd.getPgMar().getRight().intValue() ) )//"5486400";
    String cy = ""+UnitsOfMeasurement.twipToEMU(pgSz.getH().intValue()
        - (pd.getPgMar().getTop().intValue()+pd.getPgMar().getBottom().intValue() ));   //"3200400";
   
    // Now use it in the docx
    wordMLPackage.getMainDocumentPart().addObject(
        createSmartArt( layoutRelId,  dataRelId, colorsRelId,  styleRelId, cx, cy));
View Full Code Here

TOP

Related Classes of org.docx4j.wml.SectPr.PgSz

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.