Styles - Pdf Card

If you will use a Style in a Form that you will print to pdf files, you should also fill in the fields on the 'Pdf' card, especially if the Style uses a non-standard font. The standard fonts are Times New Roman PS MT, Arial MT, Courier, Symbol and Zapf Dingbats (Windows) and Times, Helvetica, Courier, Symbol and Zapf Dingbats (Mac OS X). Most pdf readers are able to read and print these fonts. If the Style uses a non-standard font, you should use the 'Pdf' card to ensure that the font will be embedded in pdf files, so that those files have the correct appearance when opened and printed by pdf readers. This is particularly important for barcode fonts.

You can create pdf files from Books by HansaWorld using two methods:

  1. Open a record, click the Printer icon and choose to print to pdf. In this case, the pdf will be generated by the operating system, which embeds fonts as necessary.

  2. Click the [Documents] button in the Master Control panel, double-click a document in the list and choose 'Pdf' as the Media option in the specification window.

    In this case, the pdf will be generated by Books by HansaWorld, which will embed fonts following the instructions on the 'Pdf' cards of the relevant Style records. In a multi-user system, the pdf file will sometimes be generated by the client and sometimes by the server.

    If a Pdf file is generated by Books by HansaWorld and you find that the Times font has been used where you are expecting a different font, then it is likely that you need to use the 'Pdf' card in the relevant Style record to embed the intended font in the Pdf file.

Font File
Paste Special    Opens the standard 'Open File' dialog that you can use to locate the font file
Specify the path to the font file. You can do this using an absolute path (C:/Books/fonts/test.ttf) or a relative path (fonts/test.ttf), relative to the directory or folder containing the Books by HansaWorld application.

As previously mentioned, in a multi-user system, pdf files can sometimes be generated by a client application and sometimes by the server. Therefore it is recommended that you enter a relative path in this field and that you store the font files inside the directory or folder containing the Books by HansaWorld application on the server and on all clients. The relative path will then point to the font file in all situations.

The font file must be an OpenType font with the .ttf extension or a Type 1 Post Script font with the .afm or .pfa extensions. Other font formats are not supported.

Pdf Built-in font
Paste Special    Choices of possible entries
If you want to embed one of the standard fonts in pdf files, specify that font here. This will usually be because the Style uses one of the standard fonts and you want to embed that font in pdf files. This will help ensure the Style prints as you expect, but will also slightly increase the size of the pdf file.

If you specify both a Pdf Built-in font and a Font File in the field above, the Pdf Built-in font will be used.

Pdf Size
The font size in points.

Select one of the available style types.
If you specify a font on the 'Pdf' card, you should also specify a Mac, Windows and/or Linux font as appropriate. When you use the Style in a Form design and print the document to a printer or preview it to screen, the Mac/Windows/Linux font will be used. The Pdf font will only be visible in pdf files.

Note that the .ttf extension does not guarantee that the font is an OpenType font, as this extension is also used with TrueType fonts. If you are using Windows, you can confirm the font format by checking the file properties or the file icon, which should contain the letter "O". If you are using Mac OS X 10.6 or later, use the Font Book application to confirm the font format. If there is still a problem (i.e. the Pdf font is not visible in a pdf file and has been replaced by Times), check the hansa.log file for error messages.

If you will use a Form to create pdf files, as well as specifying the fonts that will be embedded as described here, you should also specify a PDF Code page for that Form and, if appropriate, specify that pdf files will be created in landscape format. Please refer here for details.


In this chapter:

Go back to: