I am having a Java based web application running in Amazon EC2 Ubuntu server. I use Jasper reports to generate some reports in PDF format. I built these reports using 'Jaspersoft Studio'
Now, when I try to generate reports, I get this error
net.sf.jasperreports.engine.util.jrfontnotfoundexception font 'Times New Roman' is not available to the jvm
Googled and found this is due to Ubuntu missing windows based fonts. All the posts I found on internet about this issue are pretty old. So how can I solve this issue?
Just install the Windows fonts in your Ubuntu Server. Here you have a useful tutorial for it.
If you are as lazy as me, here you have this command which we'll do it entirely for you :)
sudo apt-get install ttf-mscorefonts-installer
In case you face any issues during installation of this package, it can be due to the fact that dpkg is locked. To circumvent this issue, restart your computer and enter this command in Terminal.
sudo dpkg --configure -a
ttf mscorefonts installer can also be installed from the packages available at the link given below.
Download ttf mscorefonts
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With