PageBorderAppliesTo enumeration

PageBorderAppliesTo enumeration

Specifies which pages the page border is printed on.

Members

NameDescription
AllPagesPage border is shown on all pages of the section.
FirstPagePage border is shown on the first page of the section only.
OtherPagesPage border is shown on all pages except the first page of the section.

Examples

Shows how to create a wide blue band border at the top of the first page.

let doc = new aw.Document();

let pageSetup = doc.sections.at(0).pageSetup;
pageSetup.borderAlwaysInFront = false;
pageSetup.borderDistanceFrom = aw.PageBorderDistanceFrom.PageEdge;
pageSetup.borderAppliesTo = aw.PageBorderAppliesTo.FirstPage;

let border = pageSetup.borders.at(aw.BorderType.Top);
border.lineStyle = aw.LineStyle.Single;
border.lineWidth = 30;
border.color = "#0000FF";
border.distanceFromText = 0;

doc.save(base.artifactsDir + "PageSetup.PageBorderProperties.docx");

See Also