The viewer has an ability to change themes of visual controls. To do this, set the theme property in the component options:

 

viewer.php

 

<?php

$options = new \Stimulsoft\Viewer\StiViewerOptions();

$options->appearance->theme = \Stimulsoft\Viewer\StiViewerTheme::Office2022WhiteBlue;

?>

 

 

 

There are currently 8 themes available with different color accents. As a result, more than 60 variants of the appearance are available. This allows you to customize the appearance of the viewer for almost any design of the Web project.

 

 

Additional settings

By default, the viewer has only upper toolbox, where there are all elements of report control. If needed, the toolbox can be divided into upper and bottom. The print menu, report export, buttons of work with parameters and bookmarks will be on the upper panel. The bottom panel will contain elements for switching between report pages and the menu of zoom control. To enable a specified mode, you should use the displayMode property, which can have the following values.

 

Name

Description

StiToolbarDisplayMode::Simple

Simple display mode, all controls are located on one control panel (the value by default).

StiToolbarDisplayMode::Separated

Original is the Separate display mode, the control panel is divided into the upper one - interaction with a report and the bottom - interaction with pages.

 

viewer.php

 

<?php

$options = new \Stimulsoft\Viewer\StiViewerOptions();

$options->toolbar->displayMode = \Stimulsoft\Viewer\StiToolbarDisplayMode::Simple;

$options->appearance->scrollbarsMode = true;

?>

 

 

 

Additionally it is possible to set design parameters of the main viewer elements. For example, you can change font and color of the viewer toolbar captions, set the viewer background, set color of page borders, etc. Below you can see the list of available properties, which change the viewer appearance and their values by default.  

 

viewer.php

 

<?

$options = new \Stimulsoft\Viewer\StiViewerOptions();

 

$options->appearance->backgroundColor = 'white';

$options->appearance->pageBorderColor = 'red';

$options->appearance->showPageShadow = false;

 

$options->toolbar->backgroundColor = 'aqua';

$options->toolbar->borderColor = 'darkgreen';

$options->toolbar->fontColor = 'white';

$options->toolbar->fontFamily = 'Arial';

?>

 

 

 

One of the standard constants for HTML colors is specified as a value for color, or a color code in RGB format, for example, '#ff2020'.