Currency Symbol Issue in PDF

ERPNext uses wkhtmltopdf library to generate PDF - which basically renders it in a browser. If the fonts are correctly installed, hard to say why they don’t show up.

Do you want to try debugging wkhtmltopdf locally on your server to see what might be the issue?

How to debug wkhtmltopdf locally in my server?

This is the downside of hosting yourself. You’ll either have to google search and figure it out, or find a freelancer to do it for you.

If you’re unable to work through things like this, you may want to consider a hosted plan. ERPNext Pricing

Also, based on past experience, make sure your fonts are executable, and make sure you have the .ttf, .woff, and .woff2 fonts in your directory to make things work.

Thank you felix, the Persian and Arabic fonts are installed but only the .ttf not .woff and .woff2 fonts only the .ttf fonts are installed and executable, should i have both type of fonts in or only .ttf is good?

if .ttf is working, then just that should be fine.

These are the fonts we install on our cloud: GitHub - frappe/fonts

fonts in GitHub - frappe/fonts has been installed as per instruction in my server but still the same problem in PDF

Looks like there is no issue with Persian/Arabic fonts i have change the currency symbol from ؋ to افغانی which is Persian/Arabic font and try to generate PDF it show افغانی correctly in PDF and Print Preview, therefore the ؋ is a symbol which is not cover in Persian/Arabic font.
Now can anyone help me in any other way to add ؋ symbol because افغانی is not symbol i just use it for test purpose only.
Waiting your good advice’s

http://www.fileformat.info/info/unicode/char/060b/fontsupport.htm

Your best bet is most likely Arial

I have install the Arial font in my server by run bellow commands:

sudo apt-get install ttf-mscorefonts-installer
sudo fc-cache

but still same issue

Can any one tell me how the INR symbol work with ERPNext, as i investigate in forum it’s belong to font-awesome, if it’s true, can you tell me how to create font-awesome of AFN symbol (؋) and use it in ERPNExt?

@felix any update?

You’ll have a search for a font with the character, and try them

Every font/symbol has a its own unicode character value.

As you asked about INR rupee it has U+20B9 ₹ INDIAN RUPEE SIGN has Unicode character. This font was supported first in ubuntu v.10 then other OS also supported later. For me this font(INR) was not working in windows7,and I solved it by updating font from Guidance for troubleshooting Windows Update issues - Windows Client | Microsoft Learn

In your case the font is available in Ubuntu. Even If I put the direct unicode value in currency list it works for web view. but the issue is wkhtmltopdf is not rendering the font famiy.

http://www.fileformat.info/info/unicode/char/60B/fontsupport.htm
so you need to link the custom font family wtih wkhtmltopdf,and the below link may help you.

@shivkumar
Thank you very much for details, now the problem is solved and i can see the currency symbol correctly on PDF as well.

That’s Good Work @mayar ! Please put your solution steps so that It can help others too.

That’s great. If steps are made available, I would like to post it as a Help Article as well.

https://frappe.erpnext.com/kb/setup/letter-head-in-the-report

Thanks again @shivkumar @umair bellow steps help me to solve the issue:

Upload/ssh the font(s) to my home folder on the server
Copy font to the system fonts folder, this way it can be used by all users on the system
sudo cp -R ~/arial /usr/share/fonts/truetype/
Check permissions
sudo chmod 755 /usr/share/fonts/truetype/arial/
Install the fonts so applications can use them
sudo fc-cache -f -v

Note: need to install all Arial font’s.

1 Like

Another solution that worked for me on Centos is following this: unix - Anyone know how to install Arial fonts on CentOs 7? - Super User

You can install liberation fonts or microsoft fonts.
The latter using:

[root@geeksite~/]# wget http://www.itzgeek.com/msttcore-fonts-2.0-3.noarch.rpm
[root@geeksite~/[# rpm -Uvh msttcore-fonts-2.0-3.noarch.rpm

that’s it.

1 Like