Click or drag to resize

PageBorders Class

Represents a set of page borders.
Inheritance Hierarchy

Namespace:  GemBox.Document
Assembly:  GemBox.Document (in GemBox.Document.dll) Version: 29.0.35.1044
Syntax
public sealed class PageBorders : MultipleBorders

The PageBorders type exposes the following members.

Properties
  NameDescription
Public propertyAlignParagraphBordersAndTableEdgesWithPageBorder

Gets or sets a value indicating whether paragraph borders specified using the Borders property and table borders using the Borders property shall be adjusted to align with extents of the page border defined using the PageBorders property if the spacing between these borders is less than or equal to 10.5 points (one character width) or less from the page border.

value of this property shall ensure there are no gaps of one character width or less between adjoining page and paragraph/table borders, as borders which are perfectly aligning shall not be displayed in favor of the intervening page border.

If value of this property is , then borders shall not be automatically adjusted to prevent gaps of less than one character width.

If the page border is not measured from the text extents (MeasureFromEdgeOfPage is ), then this property is ignored.

This property is stored in DocumentSettings, therefore it applies to the entire document.

Supported only in DOCX and DOC formats. This value is currently ignored when exporting a document to PDF, XPS or image file formats.

Default value: .

Public propertyAlwaysDisplayInFront

Gets or sets a value indicating whether the page border is positioned above or below intersecting texts and objects in this document.

Default value: .

Public propertyApplyToAllExceptFirstPage

Gets or sets a value indicating whether to apply page borders to all pages of the section, except the first page.

Default value: .

Public propertyApplyToFirstPageOnly

Gets or sets a value indicating whether to apply page borders to only the first page of the section.

Default value: .

Public propertyItem
Gets the SingleBorder for the specified SingleBorderType.
(Inherited from MultipleBorders.)
Public propertyMeasureFromEdgeOfPage

Gets or sets a value indicating whether the Space property on each page SingleBorder shall be interpreted as the distance from the edge of the page or as the distance from the PageMargins that shall be left before the page border.

Default value: .

Public propertySupportedBorderTypes
Gets the supported border types.
(Inherited from MultipleBorders.)
Public propertySurroundFooter

Gets or sets a value indicating whether the document’s page border specified using the PageBorders property should surround contents of the footer.

If the page border is not measured from the text extents (MeasureFromEdgeOfPage is ), then this property is ignored.

This property is stored in DocumentSettings, therefore it applies to the entire document.

Default value: .

Public propertySurroundHeader

Gets or sets a value indicating whether the document’s page border specified using the PageBorders property should surround contents of the header.

If the page border is not measured from the text extents (MeasureFromEdgeOfPage is ), then this property is ignored.

This property is stored in DocumentSettings, therefore it applies to the entire document.

Default value: .

Top
Methods
  NameDescription
Public methodCode exampleAdd
Sets the specified borders. This method is required to support C# collection initializer syntax and redirects its call to the SetBorders(MultipleBorderTypes, BorderStyle, Color, Double) method.
(Inherited from MultipleBorders.)
Public methodClearBorders
Clears all borders.
(Inherited from MultipleBorders.)
Public methodClearBorders(MultipleBorderTypes)
Clears the specified borders.
(Inherited from MultipleBorders.)
Public methodEquals
Determines whether the specified Object is equal to this MultipleBorders instance.
(Inherited from MultipleBorders.)
Public methodGetHashCode
Returns a hash code for this MultipleBorders instance.
(Inherited from MultipleBorders.)
Public methodCode exampleSetBorders(MultipleBorderTypes, BorderStyle, Color, Double)
Sets the specified borders.
(Inherited from MultipleBorders.)
Public methodSetBorders(MultipleBorderTypes, BorderStyle, Color, Double, Int32)
Sets the specified borders.
Top
Explicit Interface Implementations
  NameDescription
Explicit interface implementationPrivate methodCode exampleIEnumerableGetEnumerator

Returns an enumerator that iterates through all SingleBorders supported in this MultipleBorders instance.

IEnumerable interface is required to support C# collection initializer syntax.

(Inherited from MultipleBorders.)
Top
Remarks

PageBorders class is used to set borders for Section element.

Section supports Outside borders.

See Also