The viewer supports many themes and appearance options, set on the PHP options object. This example applies a dark theme and tunes the toolbar.

Viewer setup. Configure the viewer, load the report, assign it to the component, and process the requests or events raised by the UI.
$viewer = new StiViewer();
$viewer->options->appearance->fullScreenMode = true;
$viewer->options->appearance->theme = StiViewerTheme::Office2022BlackGreen;
$viewer->options->toolbar->displayMode = StiToolbarDisplayMode::Separated;
$viewer->options->toolbar->showFullScreenButton = false;
$viewer->process();


The options->appearance and options->toolbar groups mirror the JavaScript viewer options; the theme comes from StiViewerTheme, so the viewer matches the look of your site.

By using this website, you agree to the use of cookies for analytics and personalized content. Cookies store useful information on your computer to help us improve efficiency and usability. For more information, please read the privacy policy and cookie policy.