The web viewer toolbar can be extended with your own buttons using its client-side JavaScript API.

Naming the viewer. Give the viewer an instance name so you can reference it in script:
@Html.StiNetCoreViewer("StiNetCoreViewer1", new StiNetCoreViewerOptions()
{
    Actions = { GetReport = "GetReport", ViewerEvent = "ViewerEvent" }
})

Adding the button. In the viewer's onready callback, create a button and insert it into the toolbar:
jsStiNetCoreViewer1.onready = function () {
    var customButton = jsStiNetCoreViewer1.SmallButton("customButton", "Custom Button", "emptyImage");
    customButton.image.src = "icon.png";
    customButton.action = function () {
        alert("Custom Button Event");
    };

    var toolbarTable = jsStiNetCoreViewer1.controls.toolbar.firstChild.firstChild;
    var buttonsTable = toolbarTable.rows[0].firstChild.firstChild;
    buttonsTable.rows[0].insertCell(0).appendChild(customButton);
};

The client API (jsStiNetCoreViewer1) exposes the toolbar and its controls, so you can add buttons, wire them to your own logic, and integrate the viewer with the rest of your web page.

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