Font issue exporting PDF (using viewer) in Angular
Posted: Tue Jun 15, 2021 3:33 pm
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.
And the bold/italic format are not working when printing PDF. Is there anything missing?
Thank you.
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();
Thank you.