Page 1 of 1

Font issue exporting PDF (using viewer) in Angular

Posted: Tue Jun 15, 2021 3:33 pm
by adrianareigadas
Hi,

We defined a html component into mrt file with regular, bold and italic fonts (the server gets the mrt file and sends xml to the report viewer). The fonts are ok on the report viewer but it is just plain font when the viewer exports to pdf.

Code: Select all

        Stimulsoft.Base.StiFontCollection.addOpentypeFontFile('assets/reports/Arial.ttf', 'Arial');
        Stimulsoft.Base.StiFontCollection.addOpentypeFontFile('assets/reports/MicrosoftSansSerif.ttf', 'Microsoft Sans Serif');
        Stimulsoft.Base.StiFontCollection.addOpentypeFontFile('assets/reports/PTSansNarrow-Regular.ttf', 'PT Sans Narrow');

        const options = new Stimulsoft.Viewer.StiViewerOptions();
        options.appearance.showTooltips = false;
        options.toolbar.showDesignButton = false;
        options.toolbar.showAboutButton = false;
        options.toolbar.showOpenButton = false;
        options.toolbar.showSaveButton = false;
        options.toolbar.printDestination = Stimulsoft.Viewer.StiPrintDestination.Pdf;

        this.viewer = new Stimulsoft.Viewer.StiViewer(options, 'StiViewer', false);
        this.report = new Stimulsoft.Report.StiReport();
And the bold/italic format are not working when printing PDF. Is there anything missing?

Thank you.

Re: Font issue exporting PDF (using viewer) in Angular

Posted: Thu Jun 17, 2021 12:13 pm
by Lech Kulikowski
Hello,

In our web viewers, fonts are loaded, so everything should work when printing from the viewer.
If it is the export of an entire file, then yes, it has not been implemented yet. There is the task in our todo-list.

Thank you.