Viewing Modes
The viewer allows you to set various modes of interface display and report pages. In addition, you can control the display on mobile devices.
There are two modes of report display in the viewer: with scroll bars and without them. Viewing mode without scroll bars is set by default. To enable viewing mode with scroll bars you should set the true value for the scrollbarsMode property.
viewer.php |
<?php $options = new \Stimulsoft\Viewer\StiViewerOptions(); $options->appearance->scrollbarsMode = true; ?>
|
In the first mode (without scroll bars) the viewer displays the entire page or report. If sizes are specified by width and height, the viewer will crop the page that exceeded page boundaries. In the second mode, in comparison with the first, when the page will not be cropped if it's outside the viewer dimension. Instead of this scroll bars will appear with the help of them you can view a page or a report completely.
Information |
In the mode of report viewing with scroll bars, you should set the viewer height or the height with 650 pixels will be set by default.
|
There is the mode of full screen display of a report and dashboard in the viewer. Standard viewing mode is enabled by default, the viewer has specified sizes in the settings. To enable full screen mode of viewing you should set the true value for the fullScreenMode property.
viewer.php |
<?php $options = new \Stimulsoft\Viewer\StiViewerOptions(); $options->appearance->fullScreenMode = true; ?>
|
Also, to enable or disable the full screen mode, you can use the corresponding button on the viewer control panel.
There are three modes of report display: single page, the entire report as a ribbon and table display of report pages. To control modes you should use the viewMode property, which takes one of the following values.
Name |
Description |
StiWebViewMode::SinglePage |
One page, selected on the control panel is displayed. |
StiWebViewMode::Continuous |
All report pages are displayed as a ribbon. |
StiWebViewMode::MultiplePages |
All report pages are displayed as a table. |
For example, you need to set the mode of display all pages as a ribbon.
viewer.php |
<?php $options = new \Stimulsoft\Viewer\StiViewerOptions(); $options->toolbar->viewMode = \Stimulsoft\Viewer\StiWebViewMode::Continuous; ?>
|
The viewer supports the work both with a simple computer, touch screens and mobile devices. To control interface modes you should use the interfaceType property, which takes one of the following values.
Name |
Description |
StiInterfaceType::Auto |
The viewer interface will be selected automatically depending on the device you use (the value by default). |
StiInterfaceType::Mouse |
Forced using of standard interface to control the viewer using a computer mouse. |
StiInterfaceType::Touch |
Forced using of the Touch interface to control the viewer using touch screen of a monitor. In this mode interface elements of the viewer have enlarged sizes for convenient control. |
StiInterfaceType::Mobile |
Forced using of the Mobile interface to control the viewer using smartphone screen. In this mode, the viewer interface is simplified and adapted to control using a mobile device. |
For example, you need to completely disable mobile display mode.
viewer.php |
<?php $options = new \Stimulsoft\Viewer\StiViewerOptions(); $options->appearance->interfaceType = \Stimulsoft\Viewer\StiInterfaceType::Mouse; ?>
|