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).
|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.
|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.
|Figure 3: Sample Report Using the Free Sans Font|
- What's New
- Designing, building and accessing Reports
- How Do I: Get Started with Morfik Reports
- How Do I: Build Reports with Parameters
- Creating advanced reports
- The need for dynamically created PDF documents and their role in a Web application