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

GetIndFirstLine() → { twips | undefined }

Унаследованный от: ApiParaPr#GetIndFirstLine

Возвращает отступ первой строки абзаца.

Параметры:

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

Возвращает:

Тип twips | undefined

Пример

builder.CreateFile("docx");
var oDocument = Api.GetDocument();
var oParagraph = oDocument.GetElement(0);
oParagraph.AddText("This is a paragraph with the indent of 1 inch set to the first line. ");
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.SetIndFirstLine(1440);
var nIndFirstLine = oParagraph.GetIndFirstLine();
oParagraph = Api.CreateParagraph();
oParagraph.AddText("First line indent: " + nIndFirstLine);
oDocument.Push(oParagraph);
builder.SaveFile("docx", "GetIndFirstLine.docx");
builder.CloseFile();