ApiSection

class ApiSection

Description

Class representing a document section.

Instance Methods

GetClassType(): section

Returns a type of the ApiSection class.

SetType(sType)

S.

GetType(): nextPage | oddPage | evenPage | continuous | nextColumn

Returns the section type.

SetEqualColumns(nCount, nSpace)

Specifies that all the text columns in the current section are of equal width.

SetNotEqualColumns(aWidths, aSpaces)

S.

SetPageSize(nWidth, nHeight, isPortrait)

Specifies the properties (size and orientation) for all the pages in the current section.

GetPageHeight(): twips

Gets page height for current section.

GetPageWidth(): twips

Gets page width for current section.

SetPageMargins(nLeft, nTop, nRight, nBottom)

Specifies the page margins for all the pages in this section.

SetHeaderDistance(nDistance)

Specifies the distance from the top edge of the page to the top edge of the header.

SetFooterDistance(nDistance)

Specifies the distance from the bottom edge of the page to the bottom edge of the footer.

GetHeader(sType, isCreate): ApiDocumentContent

Returns the content for the specified header type.

RemoveHeader(sType)

R.

GetFooter(sType, isCreate): ApiDocumentContent

Returns the content for the specified footer type.

RemoveFooter(sType)

R.

SetTitlePage(isTitlePage)

Specifies whether the current section in this document has the different header and footer for the section first page.

GetNext(): ApiSection | "null"

Returns the next section if exists.

GetPrevious(): ApiSection | "null"

Returns the previous section if exists.

ToJSON(bWriteNumberings, bWriteStyles): JSON

Converts the ApiSection object into the JSON object.

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