GetFinalSection

function GetFinalSection(): ApiSection

Description

Returns the document final section.

Returns

ApiSection

Try It

var oDocument = Api.GetDocument();
var oSection = oDocument.GetFinalSection();
var oHeader = oSection.GetHeader("default", true);
var oParagraph = oHeader.GetElement(0);
oParagraph.AddText("This is the text in the default header");
var oTextPr = oDocument.GetDefaultTextPr();
oTextPr.SetFontSize(22);
oTextPr.SetLanguage("en-US");
oTextPr.SetFontFamily("Calibri");
var oParaPr = oDocument.GetDefaultParaPr();
oParaPr.SetSpacingLine(276, "auto");
oParaPr.SetSpacingAfter(200);
oParagraph = oDocument.GetElement(0);
oParagraph.AddText("This is a text in a paragraph.");

Get Help

  • If you have any questions about ONLYOFFICE Docs, try the FAQ section first.
  • You can request a feature or report a bug by posting an issue on GitHub.
  • You can also ask our developers on ONLYOFFICE forum (registration required).