A dashboard can be rendered and exported to a PDF file straight from code, then saved in the browser.

In React.
import { Stimulsoft } from "stimulsoft-dashboards-js-react";

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

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

function App() {
    return <button onClick={saveDashboardPdf}>Export to PDF</button>;
}

How it works. The export runs on the client engine and the result is saved as a file, so no server round-trip is needed.

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.