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

GetIndRight() → { twips | undefined }

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

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

Параметры:

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

Возвращает:

Тип twips | undefined

Пример

builder.CreateFile("docx");
var oDocument = Api.GetDocument();
var oParagraph = oDocument.GetElement(0);
oParagraph.AddText("This is a paragraph with the right offset 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.SetJc("right");
oParagraph.SetIndRight(2880);
var nIndRight = oParagraph.GetIndRight();
oParagraph = Api.CreateParagraph();
oParagraph.AddText("Right indent: " + nIndRight);
oDocument.Push(oParagraph);
builder.SaveFile("docx", "GetIndRight.docx");
builder.CloseFile();