TRY NEW VERSION

Try now New API BETA

Try out the new view and capabilities of the API documentation

START

GetFooter

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

Returns the content for the specified footer type.

Parameters:

Name Type Default Description
sType HdrFtrType

Footer type to get the content from.

isCreate boolean 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:

Type
ApiDocumentContent

Example

Copy code
builder.CreateFile("docx");
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");
builder.SaveFile("docx", "GetFooter.docx");
builder.CloseFile();

Resulting document