home   about us   contact us  
Search site for:

Using Any Font in a PDF Output

Here is a technique that will let you use any True Type Font in a PDF output:

1) Place your font file in the Resource directory for the application. A true type font file name MUST have an extension of ".ttf". Other types of font files may also be supported, but we have not tested them and do not know if they work.

2) Define a Named Resource for the Font as follows:
Resource Name=[whatever you like]
State=Rollover Selected
Location Type=Design
Location Data=[font file name without an extension]
When you enter the font file name into the Location Data field, DO NOT include the .ttf extension. Other Location Types should also work, but we have not tested them.

3) In your Output Process, define a Label widget with a Widget Name. Enter the Resource Name for the special font in the Resource field. Leave the Font Name field blank.

4) In the Pre-Display event point, use ILF to set the value of 10 into the WIDGET FONT field:
     SET     --- WIDGET NAME     =      
T    SET     --- II              =      10
T    SET     --- WIDGET FONT     = --- II
The font will be embedded into the PDF document so it should be viewable and printable on all systems, even if the font is not installed on that system. You can even use this technique to print Bar Codes.

If you encounter problems, try deleting your Em/Dbg directories and starting a new Client session.

Field Separators Anywhere

Field Separators are a handy way to get columnar lines on a scrolling display but, if the column heading is larger than the field, then putting it before or after the field doesn't work. The line will run through the middle of our heading. What we want is a way to put a field separator anywhere on the image.

We can do this by defining a dummy field (e.g., --- TEMP 1) wherever we want the separator and then using the GUI attributes on that field to specify separators. Make sure you set the Tabable and Modifiable attributes to "N", so the field is not apparent to the user at runtime.

Do you have a tip you want to pass on? Contact Us.

« Return

© Copyright 2020 - C.A.N.S.Y.S. West Limited All Rights Reserved