Currency Symbol Support when using spread savePDF

Posted by: justin.arias on 31 August 2021, 7:04 am EST

    • Post Options:
    • Link

    Posted 31 August 2021, 7:04 am EST

    We have different symbols for a list of currencies(i.e Yen, euro, Rupee, etc). However none of them display correctly when using savePDF. Are these symbols supported and if not is there a work around? I tried using the symbol and unicode version however neither show correctly.

    Thanks for any help!

  • Posted 1 September 2021, 4:56 am EST

    Hi Justin,

    This is expected behavior. For exporting these symbols, you need to register the custom font which has the Unicode of these symbols.

    For registering the font you may refer to the following demos and sample

    demo: https://www.grapecity.com/spreadjs/demos/features/pdf/custom-font-export-pdf/purejs

    register from TTF file sample: https://codesandbox.io/s/spread-js-starter-forked-qq0yn?file=/src/index.js

    Regards

    Avinash

  • Posted 1 September 2021, 9:02 am EST

    Thanks for the quick response Avinash, I will try the steps above

  • Posted 1 September 2021, 10:59 am EST

    Quick question do I need to have the unicode supported font selected or would the currency symbol still display correctly as long as the unicode supported font is registered? For example if I am typing in Times New Roman and type a currency would it display in pdf

  • Posted 2 September 2021, 1:55 am EST

    Hi Justin,

    You need to register the font file which has the Unicode symbols define in it. For example, if the Times New Roman has the Unicode for ₹ symbol then it would be exported as pdf correctly.

    We have tested the attached font file it has the Unicode for ₹ symbol.

    Regards,

    Avinash

    Poppins-Regular.zip

  • Posted 2 September 2021, 9:59 am EST

    Thanks Avinash,

    My question is if I have two fonts, one Times New Roman and the other Arial. I register both but let’s say Times New Roman supports the Unicode symbols and Arial doesn’t. If I write in Arial(No Unicode support) and I export to pdf. I would not be able to see the symbols correct?

    Meaning writing currencies in the any font besides the fonts that support Unicode symbols would just show an incorrect pdf

  • Posted 3 September 2021, 2:50 am EST

    Hi Justin,

    Yes, Your understanding is correct. The fonts that have the Unicode for symbols will export correctly. Please let ley us know if you have any further queries.

    Regards,

    Avinash

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels