Get Started
Documentation

GetFooter

GetFooter(sType, [isCreate]) → { ApiDocumentContent }

Get the content for the specified footer type.

Parameters:

Name Type Default Description
sType HdrFtrType

Type of footer to get the content from.

isCreate boolean false

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:

Type
ApiDocumentContent

Example

Copy code
builder.CreateFile("docx");
var oDocument = Api.GetDocument();
var oParagraph, oFooter;
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();
oFooter = oSection.GetFooter("default", true);
oParagraph = oFooter.GetElement(0);
oParagraph.AddText("This is a page footer");
builder.SaveFile("docx", "GetFooter.docx");
builder.CloseFile();

Resulting document