Dashboard.setPageSettings

Syntax

setPageSettings({

    settings

});

Parameters

settings. JSON object with dashboard page settings.

The following parameters are available:

Parameter name Type Brief description
Mandatory parameters:
PageSettings string

Page settings:

  • paperFormat. Paper size:

    • A4;

    • A5;

    • Letter. Letter.

    • Custom. Custom.

  • paperOrientation. Page orientation:

    • Portrait. Portrait.

    • Landscape. Landscape.

Optional parameters:
Callback function Callback function that is executed on method call.

Description

The setPageSettings method determines page settings.

Example

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:

  1. Open the dashboard with the 88665 key:

kapBox.open({
    Key: 88665
});
  1. 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:

Dashboard