DocGrid.LinePitch Property

Document Grid Line Pitch.Represents the attribte in schema: w:linePitch

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

Syntax

'Declaration
<SchemaAttrAttribute(, "linePitch")> _
Public Property LinePitch As Int32Value
    Get
    Set
'Usage
Dim instance As DocGrid
Dim value As Int32Value

value = instance.LinePitch

instance.LinePitch = value
[SchemaAttrAttribute(, "linePitch")]
public Int32Value LinePitch { get; set; }

Property Value

Type: DocumentFormat.OpenXml.Int32Value
Returns Int32Value.

Remarks

The following information from the ECMA International Standard ECMA-376 can be useful when working with this class.

Specifies the number of lines to be allowed on the document grid for the current page assuming all lines have equal line pitch applied to them. This line pitch shall not be added to any line which appears within a table cell unless the adjustLineHeightInTable element is present in the document's compatibility settings.

This attribute is specified in twentieths of a point, and defines the pitch for each line of text on this page such that the desired number of single spaced lines of text fits on the current page.

Consider a standard 8.5 x 11" page on which a 20-character wide, 20-line document grid has been defined. The resulting WordprocessingML would be defined as follows:

<w:docGrid w:linePitch="684" …/>

The linePitch attribute specifies that 34.2 points is to the amount of pitch allowed for each line on this page in order to maintain the specific document grid.

Individual paragraphs can override the line pitch information specified for the document grid by either of the following:

  • Specifying an exact line spacing value using the lineRule attribute of value exact on the spacing element

  • Specifying that the paragraph text shall not snap to the document grid via the snapToGrid element

The possible values for this attribute are defined by the ST_DecimalNumber simple type.

See Also

Reference

DocGrid Class

DocGrid Members

DocumentFormat.OpenXml.Wordprocessing Namespace