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.

Используя этот сайт, вы соглашаетесь на использование файлов Cookie для аналитики и персонализированного контента. Файлы Cookie хранят полезную информацию на вашем компьютере, чтобы помочь нам повысить эффективность и удобство использования. Для получения дополнительной информации, пожалуйста, прочтите Конфиденциальность и Использование Cookie.