Examples of XWPFHeaderFooterPolicy


Examples of org.apache.poi.xwpf.model.XWPFHeaderFooterPolicy

  }

  public void testSetWatermark() {
    XWPFDocument sampleDoc = XWPFTestDataSamples.openSampleDocument("SampleDoc.docx");
    // no header is set (yet)
    XWPFHeaderFooterPolicy policy = sampleDoc.getHeaderFooterPolicy();
    assertNull(policy.getDefaultHeader());
    assertNull(policy.getFirstPageHeader());
    assertNull(policy.getDefaultFooter());

    policy.createWatermark("DRAFT");

    assertNotNull(policy.getDefaultHeader());
    assertNotNull(policy.getFirstPageHeader());
    assertNotNull(policy.getEvenPageHeader());
  }
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.