Поделиться через


PageNumberType Class

Page Numbering Settings.When the object is serialized out as xml, its qualified name is w:pgNumType.

Inheritance Hierarchy

System.Object
  DocumentFormat.OpenXml.OpenXmlElement
    DocumentFormat.OpenXml.OpenXmlLeafElement
      DocumentFormat.OpenXml.Wordprocessing.PageNumberType

Namespace:  DocumentFormat.OpenXml.Wordprocessing
Assembly:  DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)

Syntax

'Декларация
Public Class PageNumberType _
    Inherits OpenXmlLeafElement
'Применение
Dim instance As PageNumberType
public class PageNumberType : OpenXmlLeafElement

Remarks

[ISO/IEC 29500-1 редакция 1]

17.6.12 pgNumType (Page Numbering Settings)

This element specifies the page numbering settings for all page numbers that appear in the contents of the current section.

[Example: Consider a section in which the page numbers must start at page 25. The following WordprocessingML syntax specifies that requirement:

<w:sectPr>
…
<w:pgNumType w:start="25"/>
</w:sectPr>

The pgNumType element specifies that numbering on this section must start from page number 25. end example]

Parent Elements

sectPr (§17.6.17); sectPr (§17.6.18); sectPr (§17.6.19)

Attributes

Description

chapSep (Chapter Separator Character)

Specifies the separator character that shall appear between the chapter and page number, if a chapter style has been set for page numbers in this section.

If the chapStyle attribute is not present, or its specified heading level does not have an associated numbering format, then this value is ignored, since no chapter number is output by the field.

[Example: Consider a section in a document in which the chapter must be separated from the page number using a colon character. This constraint would be specified using the following WordprocessingML:

<w:pgNumType w:chapSep="colon" w:chapStyle="1" />

The chapSep attribute declares that the chapter and page number must be separated by a colon (e.g. 1:1 for chapter one, page one). end example]

The possible values for this attribute are defined by the ST_ChapterSep simple type (§17.18.6).

chapStyle (Chapter Heading Style)

Specifies the one-based index of the heading style applied to chapter titles in the document which shall be used as chapter headings in all page numbers for this section, by locating the nearest heading of that style and extracting the numbering information.

If the specified heading style does not exist in the current section, or does not have a numbering format, then any previous level heading format shall be used as needed as the specified chapter number. If no heading has numbering information and/or is used in the section, then the chapter and chapter separator shall be omitted from the page numbering data.

[Example: Consider a page number in a section with page numbering properties that specify a chapStyle of 1 (Heading 1 style) and a chapSep of dash.

This means that for each page number in this section, the numbering value of the nearest Heading 1 style is used for the chapter value, and is followed by a dash, then the page n umber in that section. end example]

The possible values for this attribute are defined by the ST_DecimalNumber simple type (§17.18.10).

fmt (Page Number Format)

Specifies the number format that shall be used for all page numbering in this section.

[Example: A fmt value of lowerLetter indicates that a consumer must use lowercase letters for each page in this section: a,b,c… end example]

The possible values for this attribute are defined by the ST_NumberFormat simple type (§17.18.59).

start (Starting Page Number)

Specifies the page number that appears on the first page of the section.

If this value is omitted, numbering continues from the highest page number in the previous section.

[Example: Consider the following WordprocessingML:

<w:pgNumType w:fmt="lowerLetter"/>

Because the start value is omitted, the page numbers in this section begin at the value of the highest page in the previous section.

This means that if the previous section ended in page 7, this section would start with page 8. end example]

The possible values for this attribute are defined by the ST_DecimalNumber simple type (§17.18.10).

[Note: The W3C XML Schema definition of this element's content model (CT_PageNumber) is located in §A.1. end note]

© ISO/IEC29500: 2008. Приведенный выше текст переведен с английского языка на русский корпорацией Майкрософт (или ее подрядчиками) и ISO не несет ответственности за эти переводы.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

PageNumberType Members

DocumentFormat.OpenXml.Wordprocessing Namespace