PageBorderAppliesTo Enumeration |
Specifies which pages the page border is printed on.
Namespace:
Aspose.Words
Assembly:
Aspose.Words (in Aspose.Words.dll) Version: 20.3
Syntaxpublic enum PageBorderAppliesTo
Public Enumeration PageBorderAppliesTo
public enum class PageBorderAppliesTo
Members
| Member name | Value | Description |
---|
| AllPages | 0 |
Page border is shown on all pages of the section.
|
| FirstPage | 1 |
Page border is shown on the first page of the section only.
|
| OtherPages | 2 |
Page border is shown on all pages except the first page of the section.
|
Remarks
ExamplesCreates 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.PageBorderProperties.doc");
See Also