Export settings can be adjusted on the server when the user exports from the viewer, through the onBeginExportReport event.

Exporting the document. Load and render the report, configure the requested export format, and deliver the generated bytes as a file, stream, or web response.
$viewer->onBeginExportReport = function (StiExportEventArgs $args) {
    $args->fileName = "MyExportedFileName.$args->fileExtension";
    if ($args->format == StiExportFormat::Pdf) {
        /** @var StiPdfExportSettings $settings */
        $settings = $args->settings;
        $settings->creatorString = 'My Company Name';
        $settings->embeddedFonts = false;
    }
};
$viewer->process();


The event exposes the target format, file name and the format-specific settings object, so you can enforce naming, metadata or security on every export from the server side.

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