Support for UTF-8 Unicode in Reports

Support for Utf-8 Unicode in Reports is provided through a special PDF Package based on the TcPDF library. Using this Package (available for download here), Morfik Reports supports international charactersets such as Cyrillic.

International character set support is complicated since Adobe PDF does not render characters, rather it deals with glyphs. These glyphs need to be embedded inside a PDF file in a way that is surprisingly complex. For an insight to how PDF handles fonts please read this article by Jim King who is PDF Architect and a Senior Principal Scientist at Adobe.

Morfik TcPDF package supports rendering of Unicode text and provides a set of fonts that can be freely distributed supporting these characters. These fonts provide glyphs for selected encodings, so the Report designer is aware of these fonts and can deal with them correctly.

How to Support Unicode Characters in a Report

To create a report that includes Unicode characters, the TcPDF package must be installed into the project through the standard package installation procedure. To install the package, click on the Used Packages command on the ribbon control (refer to figure 1 below) and locate the TcPDF package (no widgets are installed).


security-fig1.png
Figure 1: Used Packages Command


After installation, Unicode support is implemented by selecting one of the Unicode fonts for any TextLabel placed on the report that needs to display Unicode text. Figure 2 shows the available fonts outlined in red when the font list is displayed for TextLabel1, which supports Unicode whether linked to a data field or with the caption text set at design or run time.

To see this feature in action please click here.

Report_Font_Select_Label.png
Figure 2: Available Fonts That Display Unicode Characters


The screenshot in figure 3 shows a sample report where the Comment strings are displayed using the Free Sans font.


Report_Unicode_Sample.png
Figure 3: Sample Report Using the Free Sans Font


Related Topics

Back to top