• Post category:ApiParagraph
  • Запись изменена:13.05.2023

GetIndLeft() → { twips | undefined }

Унаследовано от: ApiParaPr#GetIndLeft
Возвращает отступ слева от абзаца.

Параметры:

Этот метод не имеет параметров.

Возвращает:

Тип twips | undefined

Пример

builder.CreateFile("docx");
var oDocument = Api.GetDocument();
var oParagraph = oDocument.GetElement(0);
oParagraph.AddText("This is a paragraph with the indent of 2 inches set to it. ");
oParagraph.AddText("These sentences are used to add lines for demonstrative purposes. ");
oParagraph.AddText("These sentences are used to add lines for demonstrative purposes. ");
oParagraph.AddText("These sentences are used to add lines for demonstrative purposes.");
oParagraph.SetIndLeft(2880);
var nIndLeft = oParagraph.GetIndLeft();
oParagraph = Api.CreateParagraph();
oParagraph.AddText("Left indent: " + nIndLeft);
oDocument.Push(oParagraph);
builder.SaveFile("docx", "GetIndLeft.docx");
builder.CloseFile();