Skip to main content

Таблица DocumentAPI.PageProperties

Таблица DocumentAPI.PageProperties предоставляет такие свойства страницы как высота, ширина, размеры полей. Используется в Document.setPageProperties(), Section.getPageProperties(), Section.setPageProperties(). Применяется только в текстовом документе.

ПолеТипОписание
PageProperties.heightnumberВысота страницы
PageProperties.widthnumberШирина страницы
PageProperties.marginsInsetsПоля страницы

Примеры​


local section = document:getBlocks():getBlock(0):getSection()
local pageProperties = section:getPageProperties()
pageProperties.width = 100
pageProperties.height = 200
pageProperties.margins.left = 10
section:setPageProperties(pageProperties)
local pageProperties = DocumentAPI.PageProperties()
pageProperties.width = 100
pageProperties.height = 200
document:setPageProperties(pageProperties)
local pageProperties = DocumentAPI.PageProperties(100, 200)
document:setPageProperties(pageProperties)