PageSetup Class
Represents the page setup properties of a Section.
- Inheritance:
- System.ObjectPageSetup
Remarks
For more information, see page setup example.
Constructors
PageSetup()
Initializes a new instance of the PageSetup class.
Properties
LineNumberCountBy
Gets or sets the line number increments to be displayed.
Although each line has an associated line number, only lines which are an even multiple of this value shall be displayed.
Property Value
- System.Int32
The line number increments to be displayed in the current section.
LineNumberDistanceFromText
Gets or sets the line number distance from text (in points).
public double LineNumberDistanceFromText { get; set; }
Public Property LineNumberDistanceFromText As Double
Property Value
- System.Double
The line number distance from text.
Remarks
Set to 0 for automatic distance (Auto).
LineNumberRestartSetting
Gets or sets the line number restart setting.
public LineNumberRestartSetting LineNumberRestartSetting { get; set; }
Public Property LineNumberRestartSetting As LineNumberRestartSetting
Property Value
The line number restart setting.
LineStartingNumber
Gets or sets the line starting number.
Property Value
- System.Int32
The line starting number.
Orientation
Gets or sets the page orientation.
Property Value
The page orientation.
Remarks
Changing of Orientation property swaps values of PageWidth and PageHeight properties.
This member is supported in Print().
GemBox.Document uses enhanced printing services provided with Windows Presentation Foundation (WPF). All pages of a specific Section will be printed with settings from PageSetup of that section. Internally, WPF printing uses PrintTicket class to specify page printing settings and value of this member is applied to appropriate member of PrintTicket instance which is used to print all pages of a section with this print options member.
PrintTicket instance which is used to print every page of a section is constructed in following order:
Printing settings which do not exist in PrintOptions nor in PageSetup can be specified on base print ticket (which stream is passed to PrintOptions(Stream) constructor).
PageBorders
Gets the page borders.
Property Value
The page borders.
See Also
PageColor
Gets or sets the background color for all pages of the parent section.
Property Value
The background color for all pages of the parent section.
Remarks
If page color is not set or is set to Empty, it will be inherited from previous section. If page color is not set for the first section, then it defaults to Empty.
DOCX format supports only single page color for an entire document, so page color of the first section will be used for an entire document. Page colors of the subsequent sections won't be stored into DOCX format.
PageHeight
Gets or sets the height of the page (in points).
Property Value
- System.Double
The height of the page.
PageMargins
Gets or sets the page margins.
Property Value
The page margins.
PageNumberStyle
Gets or sets the number style for the page number.
public NumberStyle PageNumberStyle { get; set; }
Public Property PageNumberStyle As NumberStyle
Property Value
Number style for the page number.
PageStartingNumber
Gets or sets the number that appears on the first page of the section.
Property Value
- System.Nullable<System.Int32>
The page starting number.
Remarks
Specifies the page number that appears on the first page of the section.
If this value is omitted, numbering will continue from the highest page number in the previous section.
PageWidth
Gets or sets the width of the page (in points).
Property Value
- System.Double
The width of the page.
PaperType
Gets or sets the type of the paper for the page.
Property Value
The type of the paper.
Remarks
Default value for this property is A4.
This member is supported in Print().
GemBox.Document uses enhanced printing services provided with Windows Presentation Foundation (WPF). All pages of a specific Section will be printed with settings from PageSetup of that section. Internally, WPF printing uses PrintTicket class to specify page printing settings and value of this member is applied to appropriate member of PrintTicket instance which is used to print all pages of a section with this print options member.
PrintTicket instance which is used to print every page of a section is constructed in following order:
Printing settings which do not exist in PrintOptions nor in PageSetup can be specified on base print ticket (which stream is passed to PrintOptions(Stream) constructor).
RightToLeft
Gets or sets whether the direction of the section is right-to-left. Default value is false.
Property Value
- System.Boolean
true if the direction of the section is right-to-left; otherwise, false.
SectionStart
Gets or sets the type of section start.
Property Value
The type of section start.
TextColumns
Gets or sets the text columns.
public TextColumnCollection TextColumns { get; set; }
Public Property TextColumns As TextColumnCollection
Property Value
The text columns.
VerticalAlignment
Gets or sets the vertical alignment of text on each page in the section. Supported only in DOCX format.
public PageVerticalAlignment VerticalAlignment { get; set; }
Public Property VerticalAlignment As PageVerticalAlignment
Property Value
The vertical alignment of the text in the section's pages.
Methods
Clone()
Clones this PageSetup instance.