java.lang.Object
com.aspose.words.PageBorderDistanceFrom
public class PageBorderDistanceFrom
- extends java.lang.Object
Utility class containing constants.
Specifies the positioning of the page border relative to the page margin.
Example:
Shows how to create a page border that looks like a wide blue band at the top of the first page only.
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");
- See Also:
- PageSetup, PageSetup.BorderDistanceFrom
Field Summary |
static final int | TEXT = 0 | |
Border position is measured from the page margin.
|
static final int | PAGE_EDGE = 1 | |
Border position is measured from the page edge.
|
TEXT = 0 | |
public static final int TEXT |
-
Border position is measured from the page margin.
PAGE_EDGE = 1 | |
public static final int PAGE_EDGE |
-
Border position is measured from the page edge.
See Also:
Aspose.Words Documentation - the home page for the Aspose.Words Product Documentation.
Aspose.Words Support Forum - our preferred method of support.