Fonts in PDF output

If you output your reports to PDF format, some fonts may not display as expected.

Not all fonts can be used for embedding in PDF, because the license flag might prevent a font from being used. The utility $GREDIR/bin/fontinfopdf lists all fonts that can be used in PDF documents:

fontinfopdf [-V|-h|folder]

Where -V displays the version, -h displays the help, and folder displays the directory for the fonts.

If a font is found by fontinfo but not fontinfopdf, it is likely that:

  • In the case of a Type 1 font, the text (.pfa) is present in the font directories, but the binary font file (.pfb) is not there. Type 1 fonts need a .pfb file to generate the reports. You can compile the .pfb file from the .pfa file by using font compilation tools such as pfa2pfb or t1binary from the t1binaries package.
  • The True Type font is not installed on your operating system. Install the font using the OS guidelines.
  • The font is found by the JVM but not by the PDF library. Specify the font directory using the API for your language.

Asian fonts can also cause problems in PDF format. Make sure the specified fonts contain the required characters. In your report design, for any text box using Asian characters, set the fidelity property to true.