A code-driven dashboard export can be fine-tuned with a settings object — here PDF orientation and paper size.

In Vue.
<script setup lang="ts">
import { Stimulsoft } from "stimulsoft-dashboards-js-vuejs";

async function saveDashboardPdf() {
    var report = new Stimulsoft.Report.StiReport();
    report.loadFile("Dashboards/Dashboard.mrt");
    await report.renderAsync2();

    var settings = new Stimulsoft.Dashboard.Export.Settings.StiPdfDashboardExportSettings();
    settings.orientation = Stimulsoft.Report.Components.StiPageOrientation.Portrait;
    settings.paperSize = Stimulsoft.System.Drawing.Printing.PaperKind.A3;

    var pdfData = await report.exportDocumentAsync2(Stimulsoft.Report.StiExportFormat.Pdf, undefined, settings);
    Stimulsoft.System.StiObject.saveAs(pdfData, report.reportAlias + ".pdf", "application/pdf");
}
</script>

<template>
    <button @click="saveDashboardPdf">Export to PDF</button>
</template>

How it works. The settings object is passed to the export, so the generated PDF matches the layout you specify.

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