共用方式為


DocGrid.LinePitch Property

Definition

Document Grid Line Pitch

Represents the following attribute in the schema: w:linePitch

[DocumentFormat.OpenXml.SchemaAttr(23, "linePitch")]
public DocumentFormat.OpenXml.Int32Value LinePitch { get; set; }
public DocumentFormat.OpenXml.Int32Value LinePitch { get; set; }
[DocumentFormat.OpenXml.SchemaAttr(23, "linePitch")]
public DocumentFormat.OpenXml.Int32Value? LinePitch { get; set; }
[DocumentFormat.OpenXml.SchemaAttr("w:linePitch")]
public DocumentFormat.OpenXml.Int32Value? LinePitch { get; set; }
public DocumentFormat.OpenXml.Int32Value? LinePitch { get; set; }
member this.LinePitch : DocumentFormat.OpenXml.Int32Value with get, set
[<DocumentFormat.OpenXml.SchemaAttr(23, "linePitch")>]
member this.LinePitch : DocumentFormat.OpenXml.Int32Value with get, set
[<DocumentFormat.OpenXml.SchemaAttr("w:linePitch")>]
member this.LinePitch : DocumentFormat.OpenXml.Int32Value with get, set
Public Property LinePitch As Int32Value

Property Value

Returns Int32Value.

Attributes

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.

Applies to