Printing the Dashboard from Code
Our sample projects and report templates can help you learn the basics of working with our products.A dashboard can be sent to the printer straight from code — as PDF or as HTML.
In Vue.
How it works. The report object handles rendering and hands the result to the browser's print flow, so no viewer is required.
In Vue.
<script setup lang="ts">
import { Stimulsoft } from "stimulsoft-dashboards-js-vuejs";
var report = new Stimulsoft.Report.StiReport();
report.loadFile("Dashboards/Dashboard.mrt");
function printPdf_Click() { report.printToPdf(); }
function printHtml_Click() { report.print(); }
</script>
<template>
<button @click="printPdf_Click">Print PDF</button>
<button @click="printHtml_Click">Print HTML</button>
</template>report.printToPdf()— render and print the dashboard through the PDF print path.report.print()— print via the HTML path; both open the browser print dialog.
How it works. The report object handles rendering and hands the result to the browser's print flow, so no viewer is required.