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


SplitPageBreakAndParagraphMark Class

Always Move Paragraph Mark to Page after a Page Break.When the object is serialized out as xml, its qualified name is w:splitPgBreakAndParaMark.

Inheritance Hierarchy

System.Object
  DocumentFormat.OpenXml.OpenXmlElement
    DocumentFormat.OpenXml.OpenXmlLeafElement
      DocumentFormat.OpenXml.Wordprocessing.OnOffType
        DocumentFormat.OpenXml.Wordprocessing.SplitPageBreakAndParagraphMark

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

Syntax

'Declaration
Public Class SplitPageBreakAndParagraphMark _
    Inherits OnOffType
'Usage
Dim instance As SplitPageBreakAndParagraphMark
public class SplitPageBreakAndParagraphMark : OnOffType

Remarks

[ISO/IEC 29500-1 1st Edition]

9.7.3.38 splitPgBreakAndParaMark (Always Move Paragraph Mark to Page after a Page Break)

This element specifies whether a page break shall automatically complete the line on which it appears, moving the end of the paragraph to a new line on the next page, or if it shall behave as true run-level content within its current paragraph.

Typically, a page break defined using the br element (Part 1, §17.3.3.1) is treated as run-level content, which means that although it delimits the end of the page, if there is no content after it within the current paragraph, that the paragraph shall also end on that page. This element, when present with a val attribute value of true (or equivalent), specifies that a page break shall always immediately end the current page, moving the paragraph mark which delimits the end of its parent paragraph to a new line on the next page.

Note that this setting only affects the case where there is no run-level content after the page break within the paragraph - if any further run content appears in the paragraph it shall appear on subsequent lines on the next page.

[Example: Consider a WordprocessingML document with two paragraphs of content - the first ending with a page break:

<w:p>
<w:r>
<w:t>This is text before a page break.</w:t>
<w:br w:type="page" />
</w:r>
</w:p>
<w:p>
<w:r>
<w:t>This is text on the next page.</w:t>
</w:r>
</w:p>

The default presentation would have the text content This is text on the next page. as the first line of the second page, as there is no run content after the page break in paragraph one, and therefore no need for a new line on page two (in this image, a graphical illustration of the pilcrow and the page break have been added for clarity):

DocumentFormat.OpenXml.Wordprocessing.SplitPageBre

However, if this compatibility setting is turned on:

<w:compat>
<w:splitPgBreakAndParaMark />
</w:compat>

Then even though it is followed by no additional content, the page break must immediately end the first page, pushing the end of the first paragraph onto the first line of the second page, resulting in the following output:

DocumentFormat.OpenXml.Wordprocessing.SplitPageBre

end example]

Parent Elements

compat (Part 1, §17.15.1.21)

This element’s content model is defined by the common boolean property definition in Part 1, §17.17.4.

© ISO/IEC29500: 2008.

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

SplitPageBreakAndParagraphMark Members

DocumentFormat.OpenXml.Wordprocessing Namespace