com.aspose.words
Class PageBorderDistanceFrom

java.lang.Object
    extended by 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:

Creates a page border that looks like a wide blue band at the top of the first page only.
Document doc = new Document();

PageSetup ps = doc.getSections().get(0).getPageSetup();
ps.setBorderAlwaysInFront(false);
ps.setBorderDistanceFrom(PageBorderDistanceFrom.PAGE_EDGE);
ps.setBorderAppliesTo(PageBorderAppliesTo.FIRST_PAGE);

Border border = ps.getBorders().getByBorderType(BorderType.TOP);
border.setLineStyle(LineStyle.SINGLE);
border.setLineWidth(30);
border.setColor(Color.BLUE);
border.setDistanceFromText(0);

doc.save(getMyDir() + "PageSetup.PageBorderTop Out.doc");
See Also:
PageSetup, PageSetup.BorderDistanceFrom

Field Summary
static final intTEXT = 0
           Border position is measured from the page margin.
static final intPAGE_EDGE = 1
           Border position is measured from the page edge.
 

Field Detail

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.