Fonts in PDF output
If you output your reports to PDF format, some fonts may not display as expected.
You can set the properties for PDF reports, including the font directory, by
using the fgl_report_configurePDFDevice
function.
Not all fonts can be used for embedding in PDF, because the license flag might prevent a font
from being used. Two scripts in the $GREDIR/bin/ directory may be
useful:
- fontinfo lists all the fonts available on your system.
- fontinfopdf lists the fonts that can be used in PDF documents.
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
fgl_report_configurePDFDevice
function.
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, you may need to set the fidelity property to true.