Server-side exports can be fine-tuned with a settings object. This example exports to PDF with custom metadata and saves it to a file.

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.
$report->engine = StiEngineType::ServerNodeJS;
$report->process();
$report->loadFile('reports/SimpleList.mrt');
$report->render();

$settings = new StiPdfExportSettings();
$settings->creatorString = 'My Company Name';
$settings->embeddedFonts = false;

$filePath = 'reports/SimpleList.pdf';
$report->exportDocument(StiExportFormat::Pdf, $settings, false, $filePath);


Each format has a settings class (here StiPdfExportSettings) passed to exportDocument; the extra arguments let you write the result straight to a file on the server.

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.