setPageSettings({
settings
});
settings. JSON object with dashboard page settings.
The following parameters are available:
Parameter name | Type | Brief description |
Mandatory parameters: | ||
PageSettings | string | Page settings:
|
Optional parameters: | ||
Callback | function | Callback function that is executed on method call. |
The setPageSettings method determines page settings.
To execute the example, make sure that the repository contains a dashboard with the 88665 key.
Create an HTML page with example of placing the KapBox component and execute the following operations:
Open the dashboard with the 88665 key:
Select the Document > Open main menu item
Execute the following in the console:
kapBox.open({
Key: 88665
});
Execute the following in the console:
kapBox.setPageSettings({
"PageSettings": {
"paperFormat": "A4",
"paperOrientation": "Portrait"
},
"Callback": function () {
var print = new PP.Ui.Button({
ParentNode: "but",
Content: "Print",
Click: function () {
kapBox.print();
}
});
}
});
After executing the example, dashboard page settings are changed to portrait orientation, A4 paper size, and the Print button is added, clicking which opens the dialog box for selecting dashboard print options and preview window.
See also: