I am working on jasper reports to produce PDF file.
I have problem that is Font format exception when I run program which generates PDF on linux OS machine. I have used Times new roman font format for jasper file and linux OS does not support Times new roman, can anyone suggest me common font format for linux and windows OS to create jasper file .
Java defines the following five logical font families:
- Dialog
- DialogInput
- Monospaced
- Serif
- SansSerif
This means that these fonts are always available in java runtime, however they are not actual font libraries but mapped by java to some font installed on system. Hence using any of these font will not cause any error in java.
However, you are exporting to pdf that instead have what is called Standard Type 1 fonts as you can see there is no match and iText (the lib creating the pdf) will use if not defined the default font Helvetica.
The conclusion is that while using a logical font, which would not throw an errors this could lead to report inconsistency in pdf (using another font).
The solution in jasper-reports is to use font-extensions