On the server you can point the engine to a folder of font files so all of them become available to reports.

Registering the resource. Load or register the external resource before rendering so the finished report remains portable across environments.
var Stimulsoft = require('stimulsoft-reports-js');

Stimulsoft.Base.StiFontCollection.setFontsFolder('./Fonts');

var report = new Stimulsoft.Report.StiReport();
report.loadFile('FontsFolder.mrt');

report.renderAsync(() => {
    var settings = new Stimulsoft.Report.Export.StiPdfExportSettings();
    settings.embeddedFonts = true;
    report.exportDocumentAsync((pdfData) => {
        fs.writeFileSync('./FontsFolder.pdf', Buffer.from(pdfData));
    }, Stimulsoft.Report.StiExportFormat.Pdf, null, settings);
});
setFontsFolder makes every font in the folder available by name, and the PDF export setting embeddedFonts = true embeds the used fonts into the file so it displays correctly anywhere.

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.