TRY NEW VERSION

Try now New API BETA

Try out the new view and capabilities of the API documentation

START

GetPageHeight

GetPageHeight() → { twips }

Gets page height for current section.

Parameters:

This method doesn't have any parameters.

Returns:

Type
twips

Example

Copy code
builder.CreateFile("docx");
var oDocument = Api.GetDocument();
var oParagraph = oDocument.GetElement(0);
var oSection = oDocument.GetFinalSection();
var nHeight = oSection.GetPageHeight();
oParagraph.AddText("Page height = " + nHeight);
builder.SaveFile("docx", "GetPageHeight.docx");
builder.CloseFile();

Resulting document