SuppressSpacingBeforeAfterPageBreak Class
Do Not Use Space Before On First Line After a Page Break.When the object is serialized out as xml, its qualified name is w:suppressSpBfAfterPgBrk.
Inheritance Hierarchy
System.Object
DocumentFormat.OpenXml.OpenXmlElement
DocumentFormat.OpenXml.OpenXmlLeafElement
DocumentFormat.OpenXml.Wordprocessing.OnOffType
DocumentFormat.OpenXml.Wordprocessing.SuppressSpacingBeforeAfterPageBreak
Namespace: DocumentFormat.OpenXml.Wordprocessing
Assembly: DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)
Syntax
'Declaration
Public Class SuppressSpacingBeforeAfterPageBreak _
Inherits OnOffType
'Usage
Dim instance As SuppressSpacingBeforeAfterPageBreak
public class SuppressSpacingBeforeAfterPageBreak : OnOffType
Remarks
[ISO/IEC 29500-1 1st Edition]
9.7.3.42 suppressSpBfAfterPgBrk (Do Not Use Space Before On First Line After a Page Break)
This element specifies that applications should not postpone any before paragraph spacing to the first line containing content after a page break.
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. However, in the case where there is additional run-level content within the same paragraph, that content, although part of the same paragraph as the page break, is displayed on the following page.
This leads to a situation where the only run content on the page with the page break is the break itself, with all subsequent content on the following page. In this case, applications shall apply the value specified by the spacing element's before attribute to the first line on the new page (since it is ostensibly the only page with content in that paragraph).
This element, when present with a val attribute value of true (or equivalent), specifies the paragraph before spacing shall not be 'postponed' in this way - if the line with the page break has no content, then the spacing element's before attribute is simply ignored.
[Example: Consider a WordprocessingML document whose first paragraph specifies that it must be preceded by 50 points of additional spacing:
<w:p> <w:pPr> <w:spacing w:before="1000" /> </w:pPr> <w:r> <w:br w:type="page" /> <w:t>This is sample text with 50 points before formatting.</w:t> </w:r> </w:p>
The default presentation would have the necessary amount of space added to the first line on the second page, as the page break was not preceded by any run content (highlighting has been added to the image below in order to illustrate the additional spacing above the first line):
However, if this compatibility setting is turned on:
<w:compat> <w:suppressSpBfAfterPgBrk /> </w:compat>
Then the spacing must not be added above the first line on the page (it is essentially ignored), resulting in the following output:
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.