public class PageBorderAppliesTo
extends java.lang.Object
Examples:
Shows how to create a wide blue band border at the top of the first page.
Document doc = new Document();
PageSetup pageSetup = doc.getSections().get(0).getPageSetup();
pageSetup.setBorderAlwaysInFront(false);
pageSetup.setBorderDistanceFrom(PageBorderDistanceFrom.PAGE_EDGE);
pageSetup.setBorderAppliesTo(PageBorderAppliesTo.FIRST_PAGE);
Border border = pageSetup.getBorders().getByBorderType(BorderType.TOP);
border.setLineStyle(LineStyle.SINGLE);
border.setLineWidth(30.0);
border.setColor(Color.BLUE);
border.setDistanceFromText(0.0);
doc.save(getArtifactsDir() + "PageSetup.PageBorderProperties.docx");
| Modifier and Type | Field and Description |
|---|---|
static int |
ALL_PAGES
Page border is shown on all pages of the section.
|
static int |
FIRST_PAGE
Page border is shown on the first page of the section only.
|
static int |
length |
static int |
OTHER_PAGES
Page border is shown on all pages except the first page of the section.
|
| Modifier and Type | Method and Description |
|---|---|
static int |
fromName(java.lang.String pageBorderAppliesToName) |
static java.lang.String |
getName(int pageBorderAppliesTo) |
static int[] |
getValues() |
static java.lang.String |
toString(int pageBorderAppliesTo) |
public static int ALL_PAGES
public static int FIRST_PAGE
public static int OTHER_PAGES
public static int length