GetFooter

function GetFooter(sType: HdrFtrType = null, isCreate: boolean = false): ApiDocumentContent

Description

Returns the content for the specified footer type.

Parameters

sTypeHdrFtrTypedefault: null

Footer type to get the content from.

isCreatebooleandefault: false

Specifies whether to create a new footer or not with the specified footer type in case no footer with such a type could be found in the current section.

Returns

ApiDocumentContent

Try It

var oDocument = Api.GetDocument();
var oParagraph = oDocument.GetElement(0);
oParagraph.AddText("This is a page with a footer. ");
oParagraph.AddText("Scroll down the page to see it.");
var oSection = oDocument.GetFinalSection();
var oFooter = oSection.GetFooter("default", true);
oParagraph = oFooter.GetElement(0);
oParagraph.AddText("This is a page footer");

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).