We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

the error when customize font

Thread ID:





147641 Sep 18,2019 12:02 PM UTC Sep 20,2019 10:03 AM UTC Angular - EJ 2 1
Tags: PivotView
Mahdi Aghasi
Asked On September 18, 2019 12:03 PM UTC

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.

Scintilla Arul Jothi Raj [Syncfusion]
Replied On September 20, 2019 10:03 AM UTC

Hi Mahdi, 

Thanks for contacting Syncfusion support. 

We have analyzed your query and the reported problem could not be reproduced at our end. Meanwhile, we have prepared a sample with a custom font.  

If this does not match your scenario, kindly either reproduce the problem in the above sample or share the issue reproduced sample which would be helpful for us to proceed further. 

Scintilla A 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon