An instance of the PageBorder class represents the attributes of a border, which is drawn in the margin area of a page. A page border can have a top, left, right or bottom line or a combination of these lines. The line width and the color can be defined for each line separately. For each line a distance can be specified, which is either a distance to the edge of the page or to the text. The page border can surround the text including page headers and footers or only the text of the page. The border can be defined for the first page, for all pages or beginning with the second page.

Syntax

public class PageBorder
Public Class PageBorder

Introduced: 17.0.

Constructors

Constructor Description
PageBorder Creates a new instance of the PageBorder class.

Enumerations

Enumeration Description
Attribute Determines a certain page border attribute.

Fields

Field Description
DefaultDistance Represents the default distance of a page border from the edge of the page.

Properties

Property Description
BottomDistance Gets or sets the distance, in twips, of the bottom border line either from the edge of the page or from the text, depending on the MeasureFromText property.
BottomLineColor Gets or sets the color of the bottom border line.
BottomLineWidth Gets or sets the width of the bottom border line.
FirstPageOnly Gets or sets a value indicating whether the page border is drawn only on the first page of the section.
LeftDistance Gets or sets the distance, in twips, of the left border line either from the edge of the page or from the text, depending on the MeasureFromText property.
LeftLineColor Gets or sets the color of the left border line.
LeftLineWidth Gets or sets the width of the left border line.
MeasureFromText Gets or sets a value indicating whether the page border's distances are measured from the text.
OmitFirstPage Gets or sets a value indicating whether the page border is not drawn on the first page of the section.
RightDistance Gets or sets the distance, in twips, of the right border line either from the edge of the page or from the text, depending on the MeasureFromText property.
RightLineColor Gets or sets the color of the right border line.
RightLineWidth Gets or sets the width of the right border line.
SurroundFooter Gets or sets a value indicating whether the page border surrounds the section's footer.
SurroundHeader Gets or sets a value indicating whether the page border surrounds the section's header.
TopDistance Gets or sets the distance, in twips, of the top border line either from the edge of the page or from the text, depending on the MeasureFromText property.
TopLineColor Gets or sets the color of the top border line.
TopLineWidth Gets or sets the width of the top border line.