SetSpacing
Sets the text spacing measured in twentieths of a point.
Syntax
expression.SetSpacing(nSpacing);
expression - A variable that represents a ApiParagraph class.
Parameters
| Name | Required/Optional | Data type | Default | Description |
|---|---|---|---|---|
| nSpacing | Required | twips | The value of the text spacing measured in twentieths of a point (1/1440 of an inch). |
Returns
Example
This example sets the text spacing measured in twentieths of a point.
- Code
- Result
// How to specify the spacing value of paragraph.
// Indicate the paragraph text space.
let doc = Api.GetDocument();
let paragraph = doc.GetElement(0);
paragraph.AddText("This is just a sample paragraph.");
paragraph.SetSpacing(2);