Exporting a Dashboard from Code with Changing Export Settings
Our sample projects and report templates can help you learn the basics of working with our products.Server-side dashboard exports can be fine-tuned with an export-settings object — here PDF metadata and font embedding.
Configure settings, then export.
How it works. The settings object is passed to the Node.js export, so server-generated files carry exactly the metadata and options you specify.
Configure settings, then export.
$report = new StiReport();
$report->engine = StiEngineType::ServerNodeJS;
$report->process();
$report->loadFile('reports/Christmas.mrt');
$settings = new StiPdfExportSettings();
$settings->creatorString = 'My Company Name';
$settings->keywordsString = 'PHP Dashboard Export';
$settings->embeddedFonts = false;
$result = $report->exportDocument(StiExportFormat::Pdf, $settings, false, 'reports/Christmas.pdf');StiPdfExportSettings— per-format options such ascreatorString,keywordsStringandembeddedFonts.exportDocument(format, settings, false, path)— export with those settings, saving to the given file.
How it works. The settings object is passed to the Node.js export, so server-generated files carry exactly the metadata and options you specify.