Sections and Pages

A document can be split into several sections to enable different page sizes and margins and different headers and footers in the same document. An end-user can use the Page Setup dialog box available through the TextControl.SectionFormatDialog method. All section attributes and headers and footers can be set either for a single section or for the complete document. A SectionCollection available through the TextControl.Sections property enables a programmer to alter the formatting attributes of a section from programming code. The sections of a document are numbered beginning with 1. The StatusBar shows the section number at the text input position. Additionally, it shows the number of pages and the number of sections contained in the document. Because a document can have pages with different sizes a PageCollection informs about the alignment of the page and the page's text contents. Furthermore, a Page object has properties to inform about its character index, number of characters, section number and the number of the page in the section. The PageCollection is available through the TextControl.GetPages method.

Classes

Class Description
TXTextControl.Page An object of the Page class represents a formatted page of a document.
TXTextControl.PageBorder An instance of the PageBorder class represents the attributes of a border, which is drawn in the margin area of a page.
TXTextControl.PageCollection An instance of the PageCollection class contains all pages of a document.
TXTextControl.PageMargins An instance of the PageMargins class represents the page margins of a TX Text Control document or document section.
TXTextControl.PageSize An instance of the PageSize class represents the page size of a TX Text Control document or document section.
TXTextControl.PaperSize The PaperSize class is used with the TextControl.GetSupportedPaperSizes and WPF.TextControl.GetSupportedPaperSizes methods, which return the names and the sizes of all currently supported paper sizes.
TXTextControl.Section An object of the Section class represents a section of a document.
TXTextControl.SectionCollection An instance of the SectionCollection class contains all sections of a document.
TXTextControl.SectionFormat An instance of the SectionFormat class represents the formatting attributes of a section.

Constructors

Constructor Description
TXTextControl.PageBorder Creates a new instance of the PageBorder class.
TXTextControl.PageMargins Creates a new instance of the PageMargins class.
TXTextControl.PageSize Creates a new instance of the PageSize class.
TXTextControl.SectionFormat Creates a new instance of the SectionFormat class.

Enumerations

Enumeration Description
TXTextControl.PageBorder.Attribute Determines a certain page border attribute.
TXTextControl.PageMargins.Attribute Determines a certain attribute.
TXTextControl.PageSize.Attribute Determines a certain attribute.
TXTextControl.SectionFormat.Attribute Determines a certain section format attribute.

Events

Event Description
TXTextControl.ServerTextControl.DocumentLoaded Occurs when a new document has been loaded.
TXTextControl.WPF.TextControl.DocumentLoaded Occurs when a new document has been loaded.
TXTextControl.WPF.TextControl.PageChanged Occurs when the text input position has been moved to another page.
TXTextControl.WPF.TextControl.PageFormatChanged Occurs when the page format settings have been changed.
TXTextControl.WPF.TextControl.SectionChanged Occurs when the text input position has been moved to another section.

Fields

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

Methods

Method Description
TXTextControl.Page.GetImage Gets an image of the page's contents.
TXTextControl.Page.Select Selects the text of the page.
TXTextControl.PageCollection.CopyTo Copies the elements of the collection to an array, starting at a particular index.
TXTextControl.PageCollection.GetEnumerator Returns an enumerator that can be used to iterate through the collection.
TXTextControl.PageCollection.GetItem Gets a particular page from the collection.
TXTextControl.Section.Select Selects the section.
TXTextControl.SectionCollection.Add Adds a new section to a document.
TXTextControl.SectionCollection.CopyTo Copies the elements of the collection to an array, starting at a particular index.
TXTextControl.SectionCollection.GetEnumerator Returns an enumerator that can be used to iterate through the collection.
TXTextControl.SectionCollection.GetItem Gets the Section with the current text input position from the collection.
TXTextControl.ServerTextControl.GetPages Gets a collection of all pages in the document.
TXTextControl.ServerTextControl.GetSupportedPaperSizes Gets an array of PaperSize structures specifying the names and the size of all currently supported paper sizes.
TXTextControl.ServerTextControl.OnDocumentLoaded Raises the DocumentLoaded event.
TXTextControl.ServerTextControl.ResetPageMargins Resets the PageMargins property to its default value.
TXTextControl.ServerTextControl.ResetPageSize Resets the PageSize property to its default value.
TXTextControl.WPF.TextControl.GetPages Gets a collection of all pages in the document.
TXTextControl.WPF.TextControl.GetSupportedPaperSizes Gets an array of PaperSize structures specifying the names and the size of all currently supported paper sizes.
TXTextControl.WPF.TextControl.OnDocumentLoaded Raises the DocumentLoaded event.
TXTextControl.WPF.TextControl.OnPageChanged Raises the PageChanged event.
TXTextControl.WPF.TextControl.OnPageFormatChanged Raises the PageFormatChanged event.
TXTextControl.WPF.TextControl.OnSectionChanged Raises the SectionChanged event.
TXTextControl.WPF.TextControl.PageColorDialog Invokes the built-in dialog box for setting the page color.
TXTextControl.WPF.TextControl.SectionFormatDialog Invokes the built-in tabbed dialog box for setting section attributes.

Properties

Property Description
TXTextControl.Page.Bounds Gets the bounding rectangle of the page, in twips, relative to the top of the document.
TXTextControl.Page.Footer Gets the footer of the page.
TXTextControl.Page.Header Gets the header of the page.
TXTextControl.Page.Length Gets the number of characters of the page, including the page break character at the end of the page.
TXTextControl.Page.Number Gets the page's number.
TXTextControl.Page.NumberInSection Gets the page number relative to the beginning of the section the page belongs to.
TXTextControl.Page.Section Gets the number, one-based, of the section the page belongs to.
TXTextControl.Page.Start Gets the number (one-based) of the page's first character.
TXTextControl.Page.TextBounds Gets the bounding rectangle of the page's text, in twips, relative to the top of the document.
TXTextControl.PageBorder.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.
TXTextControl.PageBorder.BottomLineColor Gets or sets the color of the bottom border line.
TXTextControl.PageBorder.BottomLineWidth Gets or sets the width of the bottom border line.
TXTextControl.PageBorder.FirstPageOnly Gets or sets a value indicating whether the page border is drawn only on the first page of the section.
TXTextControl.PageBorder.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.
TXTextControl.PageBorder.LeftLineColor Gets or sets the color of the left border line.
TXTextControl.PageBorder.LeftLineWidth Gets or sets the width of the left border line.
TXTextControl.PageBorder.MeasureFromText Gets or sets a value indicating whether the page border's distances are measured from the text.
TXTextControl.PageBorder.OmitFirstPage Gets or sets a value indicating whether the page border is not drawn on the first page of the section.
TXTextControl.PageBorder.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.
TXTextControl.PageBorder.RightLineColor Gets or sets the color of the right border line.
TXTextControl.PageBorder.RightLineWidth Gets or sets the width of the right border line.
TXTextControl.PageBorder.SurroundFooter Gets or sets a value indicating whether the page border surrounds the section's footer.
TXTextControl.PageBorder.SurroundHeader Gets or sets a value indicating whether the page border surrounds the section's header.
TXTextControl.PageBorder.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.
TXTextControl.PageBorder.TopLineColor Gets or sets the color of the top border line.
TXTextControl.PageBorder.TopLineWidth Gets or sets the width of the top border line.
TXTextControl.PageCollection.Count Gets the number of elements contained in the collection.
TXTextControl.PageCollection.Item Gets a page from the collection.
TXTextControl.PageMargins.Left Specifies the left margin of a TX Text Control document or document section.
TXTextControl.PageMargins.Top Specifies the top margin of a TX Text Control document or document section.
TXTextControl.PageMargins.Right Specifies the right margin of a TX Text Control document or document section.
TXTextControl.PageMargins.Bottom Specifies the bottom margin of a TX Text Control document or document section.
TXTextControl.PageSize.Height Specifies the page height of a document or document section.
TXTextControl.PageSize.Width Specifies the page width of a document or document section.
TXTextControl.PaperSize.Height Gets the height of the paper size, in twips.
TXTextControl.PaperSize.Name Gets the name of the paper size.
TXTextControl.PaperSize.Width Gets the width of the paper size, in twips.
TXTextControl.Section.Format Gets or sets the section's formatting attributes.
TXTextControl.Section.HeadersAndFooters Gets a collection of all headers and footers of the section.
TXTextControl.Section.Length Gets the number of characters in the section.
TXTextControl.Section.Number Gets the section's number.
TXTextControl.Section.Start Gets the number (one-based) of the first character in the section.
TXTextControl.SectionCollection.Count Gets the number of elements contained in the collection.
TXTextControl.SectionCollection.Item Gets a section from the collection.
TXTextControl.SectionFormat.BreakKind Gets or sets the kind of the section break the section starts with.
TXTextControl.SectionFormat.ColumnDistances Gets the distances, in twips, between the columns on a page.
TXTextControl.SectionFormat.ColumnLineColor Gets or sets the color of a dividing line between two columns.
TXTextControl.SectionFormat.ColumnLineWidth Gets or sets the width of a dividing line between two columns.
TXTextControl.SectionFormat.Columns Gets or sets the number of columns on a page.
TXTextControl.SectionFormat.ColumnWidths Gets the widths, in twips, of the columns on a page.
TXTextControl.SectionFormat.EqualColumnWidth Gets or sets a value indicating whether the columns on a page have all the same width and the same distance between them.
TXTextControl.SectionFormat.Landscape Gets or sets a value indicating whether the section's page size is in landscape orientation.
TXTextControl.SectionFormat.PageBorder Gets or sets the attributes of a section's page border.
TXTextControl.SectionFormat.PageMargins Gets or sets the section's page margins.
TXTextControl.SectionFormat.PageSize Gets or sets the section's page size.
TXTextControl.SectionFormat.RestartPageNumbering Gets or sets a value indicating whether page numbering is restarted at the section's beginning.
TXTextControl.ServerTextControl.Landscape Gets or sets a value indicating whether the page orientation is landscape or portrait.
TXTextControl.ServerTextControl.PageMargins Gets or sets the margins for the pages of the current document.
TXTextControl.ServerTextControl.Pages Gets the number of pages contained in the current document.
TXTextControl.ServerTextControl.PageSize Specifies the width and height of the pages for the current document.
TXTextControl.ServerTextControl.PageUnit Gets or sets the measure used for page sizes and page margins.
TXTextControl.ServerTextControl.Sections Gets a collection of all sections in the document.
TXTextControl.WPF.TextControl.Landscape Gets or sets a value indicating whether the page orientation is landscape or portrait.
TXTextControl.WPF.TextControl.PageMargins Gets or sets the margins for the pages of the current document.
TXTextControl.WPF.TextControl.Pages Gets the number of pages contained in the current document.
TXTextControl.WPF.TextControl.PageSize Specifies the width and height of the pages for the current document.
TXTextControl.WPF.TextControl.PageUnit Gets or sets the measure used for page sizes and page margins.
TXTextControl.WPF.TextControl.Sections Gets a collection of all sections in the document.