Hi guys
I was trying to use export pdf in pivot table. And tried to give him a special font, because before I received the following error:
ERROR Error: Uncaught (in promise): Error: ArgumentOutOfRangeException:index, The character is not supported by the font.
Error: ArgumentOutOfRangeException:index, The character is not supported by the font.
But I changed the code from a tutorial to the following: I get the above and the following:
this.pdfExportProperties = {
theme: {
header: {font: new PdfTrueTypeFont(this.iransans, 12) },
caption: { font: new PdfTrueTypeFont(this.iransans, 10) },
record: { font: new PdfTrueTypeFont(this.iransans, 9) }
}
};
this is error :
TestComponent_Host.ngfactory.js? [sm]:1 ERROR Error: Can not read TTF font data
at TtfReader.push../node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/ttf-reader.js.TtfReader.checkPreambula (default~goal-goal-module~test-test-module.js:127710)
at TtfReader.push../node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/ttf-reader.js.TtfReader.readFontDictionary (default~goal-goal-module~test-test-module.js:127655)
at TtfReader.push../node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/ttf-reader.js.TtfReader.initialize (default~goal-goal-module~test-test-module.js:127647)
at new TtfReader (default~goal-goal-module~test-test-module.js:127587)
at UnicodeTrueTypeFont.push../node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/unicode-true-type-font.js.UnicodeTrueTypeFont.Initialize (default~goal-goal-module~test-test-module.js:128995)
at new UnicodeTrueTypeFont (default~goal-goal-module~test-test-module.js:128962)
at PdfTrueTypeFont.push../node_modules/@syncfusion/ej2-pdf-export/src/implementation/graphics/fonts/pdf-true-type-font.js.PdfTrueTypeFont.createFontInternal (default~goal-goal-module~test-test-module.js:124517)
at new PdfTrueTypeFont (default~goal-goal-module~test-test-module.js:124483)
at TestComponent.push../src/app/test/test.component.ts.TestComponent.ngOnInit (test-test-module.js:223431)
at checkAndUpdateDirectiveInline (vendor.js:83437)
what is the problem ?
Note also that the words that become pdf s are Arabic words.