Click or drag to resize
PageBorderDistanceFrom Enumeration
Specifies the positioning of the page border relative to the page margin.

Namespace: Aspose.Words
Assembly: Aspose.Words (in Aspose.Words.dll) Version: 19.11
Syntax
public enum PageBorderDistanceFrom
Members
  Member nameValueDescription
Text0 Border position is measured from the page margin.
PageEdge1 Border position is measured from the page edge.
Remarks
Examples
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.Sections[0].PageSetup;
ps.BorderAlwaysInFront = false;
ps.BorderDistanceFrom = PageBorderDistanceFrom.PageEdge;
ps.BorderAppliesTo = PageBorderAppliesTo.FirstPage;

Border border = ps.Borders[BorderType.Top];
border.LineStyle = LineStyle.Single;
border.LineWidth = 30;
border.Color = Color.Blue;
border.DistanceFromText = 0;

doc.Save(ArtifactsDir + "PageSetup.PageBorderTop.doc");
See Also