PDF

PDF is a file format created by Adobe, initially to provide a standard form for storing and editing printed publishable documents. Because documents in .pdf format can easily be seen and printed by users on a variety of computer and platform types, they are very common on the World Wide Web.

The renderer currently generate PDF files that comply with the Adobe PDF 1.4 specification. As the PDF format is backwards compatible, this means that the files can be accessed using Adobe Acrobat version 5.0 or later and other PDF viewers and utilities that accept PDF 1.4 or later.

The PDF render properties are shown in figure Figure 5.4, “PDF Options”.

Figure 5.4. PDF Options

PDF Options

Use iText API mode

This flag enables use of the iText API mode which addresses an issue with JDK 1.5 output. By default JDK 1.5 outputs text as glyphs which results in higher accuracy of output, but much bigger files. Another benefit of this is that no fonts need to be embedded, which balances the increased size of the file somewhat. By enabling this option, the renderer outputs characters on JDK 1.5 to produce smaller files. If you only work with JDK 1.4 it is recommended that you leave this option disabled.

Format

Image: When this option is selected then in the rendered PDF document each page will be a page-sized image. This results in bigger files, but requires no embedded fonts.

Grey Scale: When this is selected then the output will be displayed in shades of grey instead of colour which will make the file size smaller. If you will only be printing in black and white then it might be useful to reduce memory usage.

Dots per inch: Dots per inch indicates the desired resolution of the rendered image - larger values mean increased sharpness, but bigger file size.

Encryption

When this check box is selected the PDF file is encrypted with user and owner passwords. Encryption allows owners to control certain functions such as printing the file, copying and pasting from the file. So only when this check box is selected we can set the flag values. If the owner password is left blank, the system will generate a random password - effectively preventing anyone from changing the access options.

The encryption strength either 40 bits or 128 bits is selected from the combo box. The 40-bit strength is the standard one. You can increase a document's cryptographic strength by using 128-bit security.

Flags

With encryption enabled, a PDF viewer will determine the operations that can be performed on the document based on the list of flags.

CJK Font Mapping

The PDF specification defines 14 built-in fonts. If you use fonts that are not part of the specification they can be embedded in the report (subject to font licensing) or the glyphs can be rendered as vectors, removing the need for the font, but making selection impossible.

CJK Fonts can be very large, so embedding the glyphs or even the font itself results in large files. The next page of the PDF Render Wizard allows font names to be substituted, retaining small files, as long as the CJK fonts are available on the reader devices. The wizard page is shown in Figure 5.5, “PDF CJK Mapping”.

Figure 5.5. PDF CJK Mapping

PDF CJK Mapping

The CJK Mapping File is a text file, which contains a substitution on each line. For example:

Serif=STSong-Light
SansSerif=MSung-Light
		

You can create this mapping file as a text file in the repository, so that many reports can share it and so you can easily deploy it to the Repertoire Server if necessary. Once the mapping file is chosen, all text in the report that use Serif font will be written to PDF as STSong-Light.

Note

The font metrics used in placement of the text will still use Serif, so it is important to choose substitutions with closely matching font metrics. Adobe does not allow the free use of their CJK fonts which prevents use of the actual CJK font metrics.

Common CJK font encodings are defined in /config/EREngine-config.xml. You can add extra definitions here if you need additional fonts, but will need to restart the tool for them to be read.

Font Mapping

Physical fonts need to be installed in locations known to Java Runtime Environment.

Users can add the physical fonts that use a supported font technology by installing them either in the jre/lib/fonts directory within the J2RE, or by installing them in a way supported by the host operating system (copying them into the Fonts folder of windows, using the pkgadd command in solaris, etc).

After you have installed the Windows true type font and PostScript type 1 fonts onto your JVM, you will have to do the font mapping in Elixir Report Designer to load the right fonts for report generation.

When you start the Report the Font types will be loaded along with it.

In the config folder of ERD there is a "EREngine-config.xml" file which controls font mapping. The Java system property "elixirtech.fonts.path" is assigned the value of the absolute path of the font directory.

Table 5.1. Java AWT font types on Window platform.

Java Font AWT Familyfont.properties-mapped in JDK 1.4PDF Type1 Font Family mapped
DialogArialHelvetica Type1 - Actual font : Arial MT, true type
DialogInputCourierCourier Type 1 - Actual font : Courier, Type 1
MonospacedCourierCourier Type 1 - Actual font : Courier, Type 1
SansSerifArialHelvetica Type1 - Actual font : Arial MT, true type
SerifTimes New RomanTimes Type 1 - Actual font : TimeNewRomanPSMT,truetype

Table 5.2. Type1 PDF fonts with encoding Cp1252

Window Font Face NamePDF Type1 Font Name
Courier NewCourier
Courier New BoldCourier-Bold
Courier New ItalicCourier-Oblique
Courier New Bold ItalicCourier-BoldOblique
Times New RomanTimes-Roman
Times New Roman BoldTimes-Bold
Times New Roman ItalicTimes-Italic
Times New Roman Bold ItalicTimes-BoldItalic

Table 5.3. List of PDF Type 1 font names

PDF Type 1 Font Name (14)
Courier
Courier-Bold
Courier-Oblique
Courier-BoldOblique
Times-Roman
Times-Bold
Times-Italic
Times-BoldItalic
Helvetica
Helvetica-Bold
Helvetica-Oblique
Helvetica-BoldOblique
Symbol
ZapfDingbats

Table 5.4. List of possible encodings

Identity-H
Identity-V
Cp1250
Cp1252
Cp1257
MacRoman

Note

Many fonts are released under a license that prevents embedding. You must ensure that you are allowed to embed the fonts you use.