Difference: UsingCustomFonts (1 vs. 20)

Revision 202017-07-13 - JoeOrtagus

Line: 1 to 1
 
META TOPICPARENT name="DeveloperTips"

Defining Custom Fonts

Line: 123 to 123
 Read what other users have said about this page or add your own comments.
Changed:
<
<

<--/commentPlugin-->
>
>
Here is a sample. APPX 5.4.5 on Linux.

[appx@rhel7server data]$ 
[appx@rhel7server data]$ grep pdflib /usr/local/appx/data/appx.env
PDFLIBRESOURCEFILE=/usr/local/appx/data/pdflib.upr
PDFLIBLOGGING=filename=/tmp/pdflibdebug.txt enable remove classes={filesearch=9 api=2 resource=9}
[appx@rhel7server data]$ 
[appx@rhel7server data]$ cat /usr/local/appx/data/pdflib.upr
PS-Resources-1.0
.
SearchPath
/usr/local/appx/data/fonts
.
FontOutline
3 of 9 Barcode=3of9_new.ttf
Free 3 of 9 Extended=fre3of9x.ttf
Free 3 of 9=free3of9.ttf
IDAutomationHC39M=hc39m.ttf
.
[appx@rhel7server data]$ 
[appx@rhel7server data]$ ls -1 /usr/local/appx/data/fonts
3of9_new.ttf
fre3of9x.ttf
free3of9.ttf
hc39m.ttf
[appx@rhel7server data]$ 

-- Joe Ortagus - 2017-07-13

<--/commentPlugin-->
  -- GaryRogers - 2010-06-01

Revision 192017-06-28 - AlKalter

Line: 1 to 1
 
META TOPICPARENT name="DeveloperTips"

Defining Custom Fonts

Line: 31 to 31
 
  • Log into APPX and select Application Design for the app you where you will be using the custom font.
  • Select Named Resources and define a resource with:
Changed:
<
<
    • Select the ROLLOVER SELECTED state. If you are using Appx 5.2 or later, choose FONT instead.
>
>
    • Select the FONT state. If you are using Appx 5.1 or older, choose ROLLOVER SELECTED instead.
 
    • Set the Location Type to SERVER FILE
    • Enter the font name (not the .ttf file name) as the Location Data (Free 3 of 9 Regular, for example). Important: The font name is cached in your session. If you need to correct the name, log off & on again so Appx will pick up the new name.

Install Font in a Folder

Line: 47 to 47
 
  • Double-click searchpath and enter the path to the directory where you placed the font file. Multiple directories can be entered by separating them with a semicolon.
  • Exit regedit
You will also need to define a Named Resource for each font file with the following attributes:
Changed:
<
<
  • Select the ROLLOVER SELECTED state. If you are using Appx 5.2 or later, choose FONT instead.
>
>
  • Select the FONT state. If you are using Appx 5.1 or earlier, choose ROLLOVER SELECTED instead.
 
  • Set the Location Type to SERVER FILE
  • Enter the name of the font file without an extension in the Location Data field. Important: The font name is cached in your session. If you need to correct the name, log off & on again so Appx will pick up the new name.

Line: 57 to 57
 
  • Place the font file (Free3of9.ttf) in the Resource directory for one of your applications.
  • Log into APPX and select Application Design for the app you where you will be using the custom font.
Changed:
<
<
  • Select Name Resources and define a resource with:
    • Select the ROLLOVER SELECTED state. If you are using Appx 5.2 or later, choose FONT instead.
>
>
  • Select Named Resources and define a resource with:
    • Select the FONT state. If you are using Appx 5.1 or earlier, choose ROLLOVER SELECTED instead.
 
    • Set the Location Type to DESIGN FILE
    • Enter the font file name without the extension as the Location Data (free3of9, for example). Remember that file names are case sensitive. The font name is cached in your session. If you need to correct the name, log off & on again so Appx will pick up the new name.
Changed:
<
<

Install Font in a Folder (Platform Independant)

>
>

Install Font in a Folder (Platform Independent)

  An alternative mechanism is to create a PDFlib resource file that defines the searchpath. You can use this approach on either Windows or Linux. Here is a sample file:
Line: 87 to 87
 This file can be placed anywhere you like, and you must define the environment variable PDFLIBRESOURCEFILE to point at that file. We recommend setting the environment variable in the appx.env file.

You will also need to define a Named Resource for each font file with the following attributes:

Changed:
<
<
  • Select the ROLLOVER SELECTED state. If you are using Appx 5.2 or later, choose FONT instead.
>
>
  • Select the FONT state. If you are using Appx 5.1 or earlier, choose ROLLOVER SELECTED instead.
 
  • Set the Location Type to SERVER FILE
  • Enter the name of the font file without an extension in the Location Data field. Important: The font name is case sensitive on Linux platforms, and it is cached in your session. If you need to correct the name, log off & on again so Appx will pick up the new name.

Using the Font in Appx

Revision 182016-04-06 - JeanNeron

Line: 1 to 1
Changed:
<
<
META TOPICPARENT name="APPXDeveloper"
>
>
META TOPICPARENT name="DeveloperTips"
 

Defining Custom Fonts

How to use custom fonts in PDF outputs

Revision 172014-06-15 - JeanNeron

Line: 1 to 1
 
META TOPICPARENT name="APPXDeveloper"

Defining Custom Fonts

Line: 13 to 13
 

Custom Fonts on a Windows Server

Changed:
<
<
There are multiple ways to install and use a font on a Windows Server
>
>
There are two ways to install and use a font on a Windows Server
 

Install as Windows Font

The easiest way to include a custom font is to install the font on your Windows server. The steps to install the font will be different depending on the desktop OS release. The steps below are for Windows XP Professional.

Line: 33 to 33
 
  • Select Named Resources and define a resource with:
    • Select the ROLLOVER SELECTED state. If you are using Appx 5.2 or later, choose FONT instead.
    • Set the Location Type to SERVER FILE
Changed:
<
<
    • Enter the font name (not the .ttf file name) as the Location Data (Free 3 of 9 Regular, for example). Important: The font name is case sensitive, and it is cached in your session. If you need to correct the name, log off & on again so Appx will pick up the new name.
>
>
    • Enter the font name (not the .ttf file name) as the Location Data (Free 3 of 9 Regular, for example). Important: The font name is cached in your session. If you need to correct the name, log off & on again so Appx will pick up the new name.
 

Install Font in a Folder

Alternatively, you can install the font in a folder of your choosing, then tell the PDF printing software where to find the font. You will need to add an entry to the Windows registry which will provide a search path that APPX will use to find your font files. You can download one of the attached files at the bottom of the page (either 32 bit or 64 bit depending on your Windows version), edit the path and then simply double click the file to install the change in your registry.

Line: 49 to 49
 You will also need to define a Named Resource for each font file with the following attributes:
  • Select the ROLLOVER SELECTED state. If you are using Appx 5.2 or later, choose FONT instead.
  • Set the Location Type to SERVER FILE
Changed:
<
<
  • Enter the name of the font file without an extension in the Location Data field.

Install Font in a Folder (Method 2)

>
>
  • Enter the name of the font file without an extension in the Location Data field. Important: The font name is cached in your session. If you need to correct the name, log off & on again so Appx will pick up the new name.

Custom Fonts on a Unix or Linux Server

Follow these instructions to install a custom font. This should also work in APPX 4.2.x. This example will refer to the Free3of9.ttf bar code font.

  • Place the font file (Free3of9.ttf) in the Resource directory for one of your applications.
  • Log into APPX and select Application Design for the app you where you will be using the custom font.
  • Select Name Resources and define a resource with:
    • Select the ROLLOVER SELECTED state. If you are using Appx 5.2 or later, choose FONT instead.
    • Set the Location Type to DESIGN FILE
    • Enter the font file name without the extension as the Location Data (free3of9, for example). Remember that file names are case sensitive. The font name is cached in your session. If you need to correct the name, log off & on again so Appx will pick up the new name.

Install Font in a Folder (Platform Independant)

 
Changed:
<
<
An alternative mechanism is to create a PDFlib resource file that defines the searchpath. Here is a sample file:
>
>
An alternative mechanism is to create a PDFlib resource file that defines the searchpath. You can use this approach on either Windows or Linux. Here is a sample file:
 
Changed:
<
<
PS-Resources-1.0
>
>
PS-Resources-1.0
 
Changed:
<
<
SearchPath
>
>
.
 
Changed:
<
<
C:\WINDOWS\Font
>
>
SearchPath
 
Changed:
<
<
C:\MyCustomFonts
>
>
C:\MyCustomFonts
 
Changed:
<
<
.
>
>
.
 
Changed:
<
<
The file must begin with a line that says: PS-Resources-1.0
>
>
The file must begin with a line that says: PS-Resources-1.0, followed by line containing a single period.
 
Changed:
<
<
Then, each section begins with a resource name (in this case, SearchPath), followed by the values assigned to that resource (C:\WINDOWS\Font and C:\MyCustomFonts), and the section is terminated with a line containing only a period.
>
>
Then, each section begins with a resource name (in this case, SearchPath), followed by the values assigned to that resource (For example, C:\MyCustomFonts for Windows platforms, or /tmp/myfonts for Linux), and the section is terminated with a line containing only a period.
  The format of the resource file (along with a list of the resources you can define) is described in section 3.1.3 here: http://www.pdflib.com/fileadmin/pdflib/pdf/manuals/PDFlib-7-tutorial.pdf
Changed:
<
<
According to that document the resource file is read from the following search path:

$PDFLIBRESOURCEFILE (or %PDFLIBRESOURCEFILE% on Windows)

$PWD/upr

$PWD/pdflib.upr

$PWD is the current-working-directory of the Appx process: since that can be different for each user, we would recommend using the PDFLIBRESOURCEFILE environment variable (which you can set in the appx.env file).

Custom Fonts on a Unix or Linux Server

Follow these instructions to install a custom font. This should also work in APPX 4.2.x. This example will refer to the Free3of9.ttf bar code font.

  • Place the font file (Free3of9.ttf) in the Resource directory for one of your applications.
  • Log into APPX and select Application Design for the app you where you will be using the custom font.
  • Select Name Resources and define a resource with:
    • Select the ROLLOVER SELECTED state. If you are using Appx 5.2 or later, choose FONT instead.
    • Set the Location Type to DESIGN FILE
    • Enter the font file name without the extension as the Location Data (free3of9, for example). Remember that file names are case sensitive. The font name is cached in your session. If you need to correct the name, log off & on again so Appx will pick up the new name.
>
>
This file can be placed anywhere you like, and you must define the environment variable PDFLIBRESOURCEFILE to point at that file. We recommend setting the environment variable in the appx.env file.
 
Added:
>
>
You will also need to define a Named Resource for each font file with the following attributes:
  • Select the ROLLOVER SELECTED state. If you are using Appx 5.2 or later, choose FONT instead.
  • Set the Location Type to SERVER FILE
  • Enter the name of the font file without an extension in the Location Data field. Important: The font name is case sensitive on Linux platforms, and it is cached in your session. If you need to correct the name, log off & on again so Appx will pick up the new name.
 

Using the Font in Appx

  • On your image define a field and set these GUI Attributes:

Revision 162014-06-12 - JeanNeron

Line: 1 to 1
 
META TOPICPARENT name="APPXDeveloper"

Defining Custom Fonts

Line: 75 to 75
  According to that document the resource file is read from the following search path:
Changed:
<
<
$PDFLIBRESOURCEFILE (or %PDFLIBRESOURCE% on Windows)
>
>
$PDFLIBRESOURCEFILE (or %PDFLIBRESOURCEFILE% on Windows)
  $PWD/upr
Line: 113 to 113
  If you are having trouble getting a custom font to print you can gather debugging information by setting the following environment variable prior to starting an APPX session:
Changed:
<
<
Example; copy this to appx.env (windows) before invoking Appx;
>
>
Windows example; copy this to appx.env before invoking Appx;
  PDFLIBLOGGING=filename=c:\pdf.log enable remove classes={filesearch=9 api=2 resource=9}

Revision 152014-06-11 - JeanNeron

Line: 1 to 1
 
META TOPICPARENT name="APPXDeveloper"

Defining Custom Fonts

How to use custom fonts in PDF outputs

Changed:
<
<
Disclaimer: While these steps work in most cases this implementation of custom fonts is not supported in APPX (not in 4.x or 5.x). Not all True Type fonts will work with PDF output. You may need to try different fonts to find one that works.
>
>
Disclaimer: While these steps work in most cases this implementation of custom fonts is not supported in APPX (not in 4.x or 5.x). Appx can use vector-based TrueType fonts, but not those based on bitmaps.
 

Overview

Changed:
<
<
When designing graphical images in APPX there are 9 fonts pre-configured with the Desktop Client that are part of the Java installation within the client. In order to use custom fonts not included with the installation, such as bar codes, there are a few steps that must be taken. Follow these steps and you should be able to make use of custom fonts on your PDF outputs. Again, not all custom fonts will work and you may have to try more that one font to find one that does work.
>
>
When designing graphical images in APPX there are 9 fonts pre-configured with the Desktop Client that are part of the Java installation within the client. In order to use custom fonts not included with the installation, such as bar codes, there are a few steps that must be taken. Follow these steps and you should be able to make use of custom fonts on your PDF outputs. Again, Appx can use vector-based TrueType fonts, but not those based on bitmaps.
 

Custom Fonts on a Windows Server

Line: 65 to 65
 C:\MyCustomFonts

.

Changed:
<
<
The file must begin with a line that says: PS-Resources-1.0
>
>

The file must begin with a line that says: PS-Resources-1.0

  Then, each section begins with a resource name (in this case, SearchPath), followed by the values assigned to that resource (C:\WINDOWS\Font and C:\MyCustomFonts), and the section is terminated with a line containing only a period.

Revision 142014-06-11 - JeanNeron

Line: 1 to 1
 
META TOPICPARENT name="APPXDeveloper"

Defining Custom Fonts

Line: 9 to 9
 

Overview

Changed:
<
<
When designing graphical images in APPX there are 9 fonts pre-configured with the Desktop Client that are part of the Java installation within the client. In order to use custom fonts not included with the installation, such as bar codes, there are a few steps that must be taken. Follow these steps and you should be able to make use of custom fonts on your PDF outputs. Again, not all custom fonts will work and you may have to try more that one font to find one that does work
>
>
When designing graphical images in APPX there are 9 fonts pre-configured with the Desktop Client that are part of the Java installation within the client. In order to use custom fonts not included with the installation, such as bar codes, there are a few steps that must be taken. Follow these steps and you should be able to make use of custom fonts on your PDF outputs. Again, not all custom fonts will work and you may have to try more that one font to find one that does work.
 

Custom Fonts on a Windows Server

Added:
>
>
There are multiple ways to install and use a font on a Windows Server

Install as Windows Font

 The easiest way to include a custom font is to install the font on your Windows server. The steps to install the font will be different depending on the desktop OS release. The steps below are for Windows XP Professional.

  • Save the font to somewhere on your APPX server
Line: 22 to 25
 
  • Use the Add Fonts selector to find the font
  • Click on OK. This will install the font.
  • Reboot the server!! The font might not be recognized by the PDF printing software until after a reboot.
Added:
>
>
On more recent versions of Windows, you may be able to simply double click the font file. This will display the font, and there will be an 'Install' button to install the font.
 After you have installed a font you must tell Appx the name of the font, not the name of the font file. For example, the "Free 3 of 9" font is distributed in a file named "free3of9.ttf", but the name of the font is actually "Free 3 of 9 Regular". (you can also use "Free 3 of 9"). To find the font name, open the font file (free3of9.ttf) with Font Viewer (the easiest way to do that is to simply double-click on the font file in the Windows file manager).

  • Log into APPX and select Application Design for the app you where you will be using the custom font.
Line: 29 to 34
 
    • Select the ROLLOVER SELECTED state. If you are using Appx 5.2 or later, choose FONT instead.
    • Set the Location Type to SERVER FILE
    • Enter the font name (not the .ttf file name) as the Location Data (Free 3 of 9 Regular, for example). Important: The font name is case sensitive, and it is cached in your session. If you need to correct the name, log off & on again so Appx will pick up the new name.
Changed:
<
<
  • On your image define a field and set these GUI Attributes:
    • Select the Control Type of Label
    • In Resource enter the application and name you set in the above step
    • Leave the Font blank
    • Enter a name in the Name field ( VENDOR BAR CODE in this example)
  • In the Pre-Display event point enter the following code:
      SET      --- WIDGET NAME                =      VENDOR BAR CODE
      READ     --- WIDGET                 HOLD 1 FT 0 BY WIDGET NAME
T     SET      --- II                         =      10
T     SET      --- WIDGET FONT                =  --- II
T     REWRITE  --- WIDGET                 FAIL 0

The font will be embedded in the PDF document so the custom font should be viewable and printable on all systems whether the font is installed on the system or not.

>
>

Install Font in a Folder

 
Changed:
<
<
We have found that not all fonts work on Windows using the above approach. In that case, you can try an alternative approach which will allow APPX to directly access the font file in the directory where it is located. You will need to add an entry to the Windows registry which will provide a search path that APPX will use to find your font files. The following steps should be used to add the necessary registry entry:
>
>
Alternatively, you can install the font in a folder of your choosing, then tell the PDF printing software where to find the font. You will need to add an entry to the Windows registry which will provide a search path that APPX will use to find your font files. You can download one of the attached files at the bottom of the page (either 32 bit or 64 bit depending on your Windows version), edit the path and then simply double click the file to install the change in your registry.
 
Changed:
<
<
  • On your APPX server, open a command prompt or Run dialog box and run regedit (be very, very careful when editing the Windows registry as mistakes can possibly disable your computer)
  • >
    >
    You can also use the following steps to manually change the registry:
     
    Changed:
    <
    <
    • Navigate to HKEY_LOCAL_MACHINE\SOFTWARE
    >
    >
    On your APPX server, open a command prompt or Run dialog box and run regedit (be very, very careful when editing the Windows registry as mistakes can possibly disable your computer)
    • Navigate to HKEY_LOCAL_MACHINE\SOFTWARE for 32 bit Windows, or HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ for 64 bit Windows
     
    • Add new keys for PDFlib\PDFlib\7.0.3
    • Add a new string named searchpath
    Changed:
    <
    <
    • NOTE: on 64-bit Windows hosts (such as Windows 7), the key should be named HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\PDFlib\PDFlib\7.0.3\searchpath
    • Double-click searchpath and enter the path to the directory where you placed the font file. If the font is placed in the default font directory on Windows XP the entry would be c:\WINDOWS\Font. Multiple directories can be entered by separating them with a semicolon.
    >
    >
    • Double-click searchpath and enter the path to the directory where you placed the font file. Multiple directories can be entered by separating them with a semicolon.
     
    • Exit regedit
    Changed:
    <
    <
  • You will also need to define a Named Resource for each font file with the following attributes:
  • >
    >
    You will also need to define a Named Resource for each font file with the following attributes:
     
    • Select the ROLLOVER SELECTED state. If you are using Appx 5.2 or later, choose FONT instead.
    • Set the Location Type to SERVER FILE
    Changed:
    <
    <
    • Enter the name of the font file without an extension in the Location Data field ( free3of9 , for example, free3of9.ttf ).
  • On your output process image define a field and set these GUI Attributes:
    • Select the Widget Control Type of Label
    • In the Resource field, enter the application and the name of the Named Resource that you set in the above step
    • Leave the Font blank
    • Enter a name in the Name field ( VENDOR BAR CODE in this example)
  • In the Pre-Display event point enter the following code:
  •       SET      --- WIDGET NAME                =      VENDOR BAR CODE
          READ     --- WIDGET                 HOLD 1 FT 0 BY WIDGET NAME
    T     SET      --- II                         =      10
    T     SET      --- WIDGET FONT                =  --- II
    T     REWRITE  --- WIDGET                 FAIL 0
    >
    >
    • Enter the name of the font file without an extension in the Location Data field.

    Install Font in a Folder (Method 2)

    An alternative mechanism is to create a PDFlib resource file that defines the searchpath. Here is a sample file:

    PS-Resources-1.0

    SearchPath

    C:\WINDOWS\Font

    C:\MyCustomFonts

    .

    The file must begin with a line that says: PS-Resources-1.0

    Then, each section begins with a resource name (in this case, SearchPath), followed by the values assigned to that resource (C:\WINDOWS\Font and C:\MyCustomFonts), and the section is terminated with a line containing only a period.

    The format of the resource file (along with a list of the resources you can define) is described in section 3.1.3 here: http://www.pdflib.com/fileadmin/pdflib/pdf/manuals/PDFlib-7-tutorial.pdf

    According to that document the resource file is read from the following search path:

    $PDFLIBRESOURCEFILE (or %PDFLIBRESOURCE% on Windows)

    $PWD/upr

    $PWD/pdflib.upr

    $PWD is the current-working-directory of the Appx process: since that can be different for each user, we would recommend using the PDFLIBRESOURCEFILE environment variable (which you can set in the appx.env file).

     

    Custom Fonts on a Unix or Linux Server

    Follow these instructions to install a custom font. This should also work in APPX 4.2.x. This example will refer to the Free3of9.ttf bar code font.

    Line: 77 to 91
     
      • Select the ROLLOVER SELECTED state. If you are using Appx 5.2 or later, choose FONT instead.
      • Set the Location Type to DESIGN FILE
      • Enter the font file name without the extension as the Location Data (free3of9, for example). Remember that file names are case sensitive. The font name is cached in your session. If you need to correct the name, log off & on again so Appx will pick up the new name.
    Added:
    >
    >

    Using the Font in Appx

     
    • On your image define a field and set these GUI Attributes:
      • Select the Control Type of Label
      • In Resource enter the application and name you set in the above step
    Line: 111 to 128
     
    <--/commentPlugin-->

    -- GaryRogers - 2010-06-01

    Added:
    >
    >

    META FILEATTACHMENT attachment="pdflib32.reg" attr="" comment="Registry file for 32 bit Windows" date="1402503950" name="pdflib32.reg" path="pdflib32.reg" size="262" user="JeanNeron" version="1"
    META FILEATTACHMENT attachment="pdflib64.reg" attr="" comment="Registry file for 64 bit Windows" date="1402503988" name="pdflib64.reg" path="pdflib64.reg" size="286" user="JeanNeron" version="1"

    Revision 132014-05-18 - KorryD

    Line: 1 to 1
     
    META TOPICPARENT name="APPXDeveloper"

    Defining Custom Fonts

    Line: 26 to 26
     
    • Log into APPX and select Application Design for the app you where you will be using the custom font.
    • Select Named Resources and define a resource with:
    Changed:
    <
    <
      • Select the ROLLOVER SELECTED state. If you are using Appx 5.2 or later, choose FONT instead.
      • Set the Location Type to SERVER FILE
      • Enter the font name (not .ttf file name) as the Location Data (Free 3 of 9 Regular, for example). Important: The font name is case sensitive, and it is cached in your session. If you need to correct the name, log off & on again so Appx will pick up the new name.
    >
    >
      • Select the ROLLOVER SELECTED state. If you are using Appx 5.2 or later, choose FONT instead.
      • Set the Location Type to SERVER FILE
      • Enter the font name (not the .ttf file name) as the Location Data (Free 3 of 9 Regular, for example). Important: The font name is case sensitive, and it is cached in your session. If you need to correct the name, log off & on again so Appx will pick up the new name.
     
    • On your image define a field and set these GUI Attributes:
      • Select the Control Type of Label
      • In Resource enter the application and name you set in the above step
      • Leave the Font blank
    Changed:
    <
    <
      • Enter a name in the Name field (VENDOR BAR CODE in this example)
    >
    >
      • Enter a name in the Name field ( VENDOR BAR CODE in this example)
     
    • In the Pre-Display event point enter the following code:
          SET      --- WIDGET NAME                =      VENDOR BAR CODE
          READ     --- WIDGET                 HOLD 1 FT 0 BY WIDGET NAME
    
    
    Line: 47 to 47
     
  • On your APPX server, open a command prompt or Run dialog box and run regedit (be very, very careful when editing the Windows registry as mistakes can possibly disable your computer)
  • Changed:
    <
    <
    • Navigate to HKEYS_LOCAL_MACHINE\SOFTWARE
    • Add new keys for PDFlib\PDFlib\7.0.3
    • Add a new string for searchpath
    • Double-click searchpath and enter the path to the directory where you placed the font file. If the font is placed in the default font directory on Windows XP the entry would be c:\WINDOWS\Font. Multiple directories can be entered by separating them with a semicolon.
    >
    >
    • Navigate to HKEY_LOCAL_MACHINE\SOFTWARE
    • Add new keys for PDFlib\PDFlib\7.0.3
    • Add a new string named searchpath
    • NOTE: on 64-bit Windows hosts (such as Windows 7), the key should be named HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\PDFlib\PDFlib\7.0.3\searchpath
    • Double-click searchpath and enter the path to the directory where you placed the font file. If the font is placed in the default font directory on Windows XP the entry would be c:\WINDOWS\Font. Multiple directories can be entered by separating them with a semicolon.
     
    • Exit regedit
  • You will also need to define a Named Resource for each font file with the following attributes:
  • Changed:
    <
    <
    • Select the ROLLOVER SELECTED state. If you are using Appx 5.2 or later, choose FONT instead.
    • Set the Location Type to SERVER FILE
    • Enter the name of the font file without an extension in the Location Data field (free3of9, for example).
    >
    >
    • Select the ROLLOVER SELECTED state. If you are using Appx 5.2 or later, choose FONT instead.
    • Set the Location Type to SERVER FILE
    • Enter the name of the font file without an extension in the Location Data field ( free3of9 , for example, free3of9.ttf ).
     
  • On your output process image define a field and set these GUI Attributes:
    • Select the Widget Control Type of Label
    • In the Resource field, enter the application and the name of the Named Resource that you set in the above step
    • Leave the Font blank
  • Changed:
    <
    <
    • Enter a name in the Name field (VENDOR BAR CODE in this example)
    >
    >
    • Enter a name in the Name field ( VENDOR BAR CODE in this example)
     
  • In the Pre-Display event point enter the following code:
  •       SET      --- WIDGET NAME                =      VENDOR BAR CODE
          READ     --- WIDGET                 HOLD 1 FT 0 BY WIDGET NAME
    T     SET      --- II                         =      10
    
    
    Line: 73 to 74
     
    • Place the font file (Free3of9.ttf) in the Resource directory for one of your applications.
    • Log into APPX and select Application Design for the app you where you will be using the custom font.
    • Select Name Resources and define a resource with:
    Changed:
    <
    <
      • Select the ROLLOVER SELECTED state. If you are using Appx 5.2 or later, choose FONT instead.
      • Set the Location Type to DESIGN FILE
    >
    >
      • Select the ROLLOVER SELECTED state. If you are using Appx 5.2 or later, choose FONT instead.
      • Set the Location Type to DESIGN FILE
     
      • Enter the font file name without the extension as the Location Data (free3of9, for example). Remember that file names are case sensitive. The font name is cached in your session. If you need to correct the name, log off & on again so Appx will pick up the new name.
    • On your image define a field and set these GUI Attributes:
      • Select the Control Type of Label
      • In Resource enter the application and name you set in the above step
      • Leave the Font blank
    Changed:
    <
    <
      • Enter a name in the Name field (VENDOR BAR CODE in this example)
    >
    >
      • Enter a name in the Name field ( VENDOR BAR CODE in this example)
     
    • In the Pre-Display event point enter the following code:
          SET      --- WIDGET NAME                =      VENDOR BAR CODE
          READ     --- WIDGET                 HOLD 1 FT 0 BY WIDGET NAME
    
    

    Revision 122014-05-18 - KorryD

    Line: 1 to 1
     
    META TOPICPARENT name="APPXDeveloper"

    Defining Custom Fonts

    Line: 25 to 25
     After you have installed a font you must tell Appx the name of the font, not the name of the font file. For example, the "Free 3 of 9" font is distributed in a file named "free3of9.ttf", but the name of the font is actually "Free 3 of 9 Regular". (you can also use "Free 3 of 9"). To find the font name, open the font file (free3of9.ttf) with Font Viewer (the easiest way to do that is to simply double-click on the font file in the Windows file manager).

    • Log into APPX and select Application Design for the app you where you will be using the custom font.
    Changed:
    <
    <
    • Select Name Resources and define a resource with:
    >
    >
    • Select Named Resources and define a resource with:
     
      • Select the ROLLOVER SELECTED state. If you are using Appx 5.2 or later, choose FONT instead.
      • Set the Location Type to SERVER FILE
      • Enter the font name (not .ttf file name) as the Location Data (Free 3 of 9 Regular, for example). Important: The font name is case sensitive, and it is cached in your session. If you need to correct the name, log off & on again so Appx will pick up the new name.

    Revision 112014-02-25 - JeanNeron

    Line: 1 to 1
     
    META TOPICPARENT name="APPXDeveloper"

    Defining Custom Fonts

    Line: 21 to 21
     
    • From the File menu, choose "Install New Font..."
    • Use the Add Fonts selector to find the font
    • Click on OK. This will install the font.
    Added:
    >
    >
    • Reboot the server!! The font might not be recognized by the PDF printing software until after a reboot.
     After you have installed a font you must tell Appx the name of the font, not the name of the font file. For example, the "Free 3 of 9" font is distributed in a file named "free3of9.ttf", but the name of the font is actually "Free 3 of 9 Regular". (you can also use "Free 3 of 9"). To find the font name, open the font file (free3of9.ttf) with Font Viewer (the easiest way to do that is to simply double-click on the font file in the Windows file manager).

    • Log into APPX and select Application Design for the app you where you will be using the custom font.
    Line: 52 to 53
     
    • Double-click searchpath and enter the path to the directory where you placed the font file. If the font is placed in the default font directory on Windows XP the entry would be c:\WINDOWS\Font. Multiple directories can be entered by separating them with a semicolon.
    • Exit regedit
  • You will also need to define a Named Resource for each font file with the following attributes:
  • Changed:
    <
    <
    • Select the ROLLOVER SELECTED state. If you are using Appx 5.2 or later, choose FONT instead.
    >
    >
    • Select the ROLLOVER SELECTED state. If you are using Appx 5.2 or later, choose FONT instead.
     
    • Set the Location Type to SERVER FILE
    • Enter the name of the font file without an extension in the Location Data field (free3of9, for example).
  • On your output process image define a field and set these GUI Attributes:
  • Line: 72 to 73
     
    • Place the font file (Free3of9.ttf) in the Resource directory for one of your applications.
    • Log into APPX and select Application Design for the app you where you will be using the custom font.
    • Select Name Resources and define a resource with:
    Changed:
    <
    <
      • Select the ROLLOVER SELECTED state. If you are using Appx 5.2 or later, choose FONT instead.
    >
    >
      • Select the ROLLOVER SELECTED state. If you are using Appx 5.2 or later, choose FONT instead.
     
      • Set the Location Type to DESIGN FILE
      • Enter the font file name without the extension as the Location Data (free3of9, for example). Remember that file names are case sensitive. The font name is cached in your session. If you need to correct the name, log off & on again so Appx will pick up the new name.
    • On your image define a field and set these GUI Attributes:
    Line: 99 to 100
     "enable" means that you want to enable logging
    "remove" means that you want PDFlib to remove any log file (of the same name) before starting
    The "classes" clause specifies the information you want to log (and the level of detail for each category)

    It would be helpful to include the log generated by this process when reporting PDF output issues.

    Added:
    >
    >
    If the log shows that PDFlib is unable to find your installed font, try rebooting the server.
     

    Comments:

    Read what other users have said about this page or add your own comments.

    Revision 102013-02-12 - JeanNeron

    Line: 1 to 1
     
    META TOPICPARENT name="APPXDeveloper"

    Defining Custom Fonts

    Line: 25 to 25
     
    • Log into APPX and select Application Design for the app you where you will be using the custom font.
    • Select Name Resources and define a resource with:
    Changed:
    <
    <
      • Select the ROLLOVER SELECTED state
    >
    >
      • Select the ROLLOVER SELECTED state. If you are using Appx 5.2 or later, choose FONT instead.
     
      • Set the Location Type to SERVER FILE
      • Enter the font name (not .ttf file name) as the Location Data (Free 3 of 9 Regular, for example). Important: The font name is case sensitive, and it is cached in your session. If you need to correct the name, log off & on again so Appx will pick up the new name.
    • On your image define a field and set these GUI Attributes:
    Line: 52 to 52
     
    • Double-click searchpath and enter the path to the directory where you placed the font file. If the font is placed in the default font directory on Windows XP the entry would be c:\WINDOWS\Font. Multiple directories can be entered by separating them with a semicolon.
    • Exit regedit
  • You will also need to define a Named Resource for each font file with the following attributes:
  • Changed:
    <
    <
    • Select the ROLLOVER SELECTED state
    >
    >
    • Select the ROLLOVER SELECTED state. If you are using Appx 5.2 or later, choose FONT instead.
     
    • Set the Location Type to SERVER FILE
    • Enter the name of the font file without an extension in the Location Data field (free3of9, for example).
  • On your output process image define a field and set these GUI Attributes:
  • Line: 72 to 72
     
    • Place the font file (Free3of9.ttf) in the Resource directory for one of your applications.
    • Log into APPX and select Application Design for the app you where you will be using the custom font.
    • Select Name Resources and define a resource with:
    Changed:
    <
    <
      • Select the ROLLOVER SELECTED state
    >
    >
      • Select the ROLLOVER SELECTED state. If you are using Appx 5.2 or later, choose FONT instead.
     
      • Set the Location Type to DESIGN FILE
      • Enter the font file name without the extension as the Location Data (free3of9, for example). Remember that file names are case sensitive. The font name is cached in your session. If you need to correct the name, log off & on again so Appx will pick up the new name.
    • On your image define a field and set these GUI Attributes:

    Revision 92012-10-05 - JeffPrentice

    Line: 1 to 1
     
    META TOPICPARENT name="APPXDeveloper"

    Defining Custom Fonts

    Line: 92 to 92
      If you are having trouble getting a custom font to print you can gather debugging information by setting the following environment variable prior to starting an APPX session:
    Changed:
    <
    <
    set PDFLIBLOGGING=filename=c:\pdf.log enable remove classes={filesearch=9 api=2 resource=9}
    >
    >
    Example; copy this to appx.env (windows) before invoking Appx;

    PDFLIBLOGGING=filename=c:\pdf.log enable remove classes={filesearch=9 api=2 resource=9}

      "enable" means that you want to enable logging
    "remove" means that you want PDFlib to remove any log file (of the same name) before starting
    The "classes" clause specifies the information you want to log (and the level of detail for each category)

    Revision 82012-04-08 - ChrisBrower

    Line: 1 to 1
     
    META TOPICPARENT name="APPXDeveloper"

    Defining Custom Fonts

    Line: 21 to 21
     
    • From the File menu, choose "Install New Font..."
    • Use the Add Fonts selector to find the font
    • Click on OK. This will install the font.
    Changed:
    <
    <

    After you have installed a font you must tell Appx the name of the font, not the name of the font file. For example, the "Free 3 of 9" font is distributed in a file named "free3of9.ttf", but the name of the font is actually "Free 3 of 9 Regular". (you can also use "Free 3 of 9"). To find the font name, open the font file (free3of9.ttf) with Font Viewer (the easiest way to do that is to simply double-click on the font file in the Windows file manager).
    >
    >
    After you have installed a font you must tell Appx the name of the font, not the name of the font file. For example, the "Free 3 of 9" font is distributed in a file named "free3of9.ttf", but the name of the font is actually "Free 3 of 9 Regular". (you can also use "Free 3 of 9"). To find the font name, open the font file (free3of9.ttf) with Font Viewer (the easiest way to do that is to simply double-click on the font file in the Windows file manager).
     
    • Log into APPX and select Application Design for the app you where you will be using the custom font.
    • Select Name Resources and define a resource with:
    Line: 97 to 97
     "enable" means that you want to enable logging
    "remove" means that you want PDFlib to remove any log file (of the same name) before starting
    The "classes" clause specifies the information you want to log (and the level of detail for each category)

    It would be helpful to include the log generated by this process when reporting PDF output issues.

    Added:
    >
    >

    Comments:

    Read what other users have said about this page or add your own comments.



    <--/commentPlugin-->
      -- GaryRogers - 2010-06-01 \ No newline at end of file

    Revision 72012-04-05 - BredaHennessy

    Line: 1 to 1
     
    META TOPICPARENT name="APPXDeveloper"

    Defining Custom Fonts

    Line: 74 to 74
     
    • Select Name Resources and define a resource with:
      • Select the ROLLOVER SELECTED state
      • Set the Location Type to DESIGN FILE
    Changed:
    <
    <
      • Enter the font file name without the extension as the Location Data (free3of9, for example). Remember that file name are case sensitive. The font name is cached in your session. If you need to correct the name, log off & on again so Appx will pick up the new name.
    >
    >
      • Enter the font file name without the extension as the Location Data (free3of9, for example). Remember that file names are case sensitive. The font name is cached in your session. If you need to correct the name, log off & on again so Appx will pick up the new name.
     
    • On your image define a field and set these GUI Attributes:
      • Select the Control Type of Label
      • In Resource enter the application and name you set in the above step
    Line: 90 to 90
     The font will be embedded in the PDF document so the custom font should be viewable and printable on all systems whether the font is installed on the system or not.

    PDF Debug Logging

    Changed:
    <
    <
    If you are having trouble getting a custom font to print you can gather debugging information by setting the following environmment variable prior to starting an APPX session:
    >
    >
    If you are having trouble getting a custom font to print you can gather debugging information by setting the following environment variable prior to starting an APPX session:
      set PDFLIBLOGGING=filename=c:\pdf.log enable remove classes={filesearch=9 api=2 resource=9}

    "enable" means that you want to enable logging
    "remove" means that you want PDFlib to remove any log file (of the same name) before starting
    The "classes" clause specifies the information you want to log (and the level of detail for each category)

    Changed:
    <
    <
    It would be helpful to include the log generated by this processs when reporting PDF output issues.
    >
    >
    It would be helpful to include the log generated by this process when reporting PDF output issues.
      -- GaryRogers - 2010-06-01

    Revision 62011-03-14 - SteveFrizzell

    Line: 1 to 1
     
    META TOPICPARENT name="APPXDeveloper"

    Defining Custom Fonts

    Line: 15 to 15
      The easiest way to include a custom font is to install the font on your Windows server. The steps to install the font will be different depending on the desktop OS release. The steps below are for Windows XP Professional.
    Changed:
    <
    <
    • Save the font to somewhere on your server
    >
    >
    • Save the font to somewhere on your APPX server
     
    • Open the Windows Control Panel
    • Open the Fonts folder
    • From the File menu, choose "Install New Font..."
    Line: 42 to 42
     T REWRITE --- WIDGET FAIL 0

    The font will be embedded in the PDF document so the custom font should be viewable and printable on all systems whether the font is installed on the system or not.

    Deleted:
    <
    <

    Alternative Windows Font Installation

     
    Changed:
    <
    <
    If you followed the instructions above and the font failed to print this alternative set if installation instructions may work.
    • Place the font somewhere on your server. The default for Windows XP is C:\WINDOWS\Fonts for example.
    • From the cmd prompt or Run dialog box enter regedit (be very, very careful here, mistakes can disable your computer)
    >
    >
    We have found that not all fonts work on Windows using the above approach. In that case, you can try an alternative approach which will allow APPX to directly access the font file in the directory where it is located. You will need to add an entry to the Windows registry which will provide a search path that APPX will use to find your font files. The following steps should be used to add the necessary registry entry:

  • On your APPX server, open a command prompt or Run dialog box and run regedit (be very, very careful when editing the Windows registry as mistakes can possibly disable your computer)
  •  
      • Navigate to HKEYS_LOCAL_MACHINE\SOFTWARE
      • Add new keys for PDFlib\PDFlib\7.0.3
      • Add a new string for searchpath
    Changed:
    <
    <
      • Double-click searchpath and enter the path to the directory where you placed the font file. If the font is placed in the default font file on Windows XP the entry would be c:\WINDOWS\Font. Multiple directories can be entered by separating them with a semicolon.
    >
    >
    • Double-click searchpath and enter the path to the directory where you placed the font file. If the font is placed in the default font directory on Windows XP the entry would be c:\WINDOWS\Font. Multiple directories can be entered by separating them with a semicolon.
     
      • Exit regedit
    Changed:
    <
    <
    • Set the APPX environment variable APPX_USER_FONT_2 to the name of the font file without the .ttf extension. For example, to use the Free 3 of 9 barcode font the variable would be set to APPX_USER_FONT_2=free3of9
    • Log into APPX and select Application Design for the app you where you will be using the custom font.
    • On your image define a field and set these GUI Attributes:
      • Select the Control Type of Label
    >
    >
  • You will also need to define a Named Resource for each font file with the following attributes:
    • Select the ROLLOVER SELECTED state
    • Set the Location Type to SERVER FILE
    • Enter the name of the font file without an extension in the Location Data field (free3of9, for example).
  • On your output process image define a field and set these GUI Attributes:
    • Select the Widget Control Type of Label
    • In the Resource field, enter the application and the name of the Named Resource that you set in the above step
  •  
      • Leave the Font blank
    Changed:
    <
    <
      • Leave the Resource blank
      • Enter a name for the widget in the Name field (VENDOR BAR CODE in this example)
    • In the Pre-Display event point enter the following code:
          SET      --- WIDGET NAME                =      VENDOR BAR CODE
    
    
    >
    >
    • Enter a name in the Name field (VENDOR BAR CODE in this example)
  • In the Pre-Display event point enter the following code:
  •       SET      --- WIDGET NAME                =      VENDOR BAR CODE
    
    
      READ --- WIDGET HOLD 1 FT 0 BY WIDGET NAME
    Changed:
    <
    <
    T SET --- II = 11
    >
    >
    T SET --- II = 10
     T SET --- WIDGET FONT = --- II T REWRITE --- WIDGET FAIL 0
    Deleted:
    <
    <
    Please note that using this approach the value --- II is set to 11 rather than 10.
     

    Custom Fonts on a Unix or Linux Server

    Follow these instructions to install a custom font. This should also work in APPX 4.2.x. This example will refer to the Free3of9.ttf bar code font.

    Revision 52011-03-09 - GaryRogers

    Line: 1 to 1
     
    META TOPICPARENT name="APPXDeveloper"

    Defining Custom Fonts

    Line: 15 to 15
      The easiest way to include a custom font is to install the font on your Windows server. The steps to install the font will be different depending on the desktop OS release. The steps below are for Windows XP Professional.
    Changed:
    <
    <
    • Save the font to somewhere on your desktop
    >
    >
    • Save the font to somewhere on your server
     
    • Open the Windows Control Panel
    • Open the Fonts folder
    • From the File menu, choose "Install New Font..."
    Line: 29 to 29
     
      • Select the ROLLOVER SELECTED state
      • Set the Location Type to SERVER FILE
      • Enter the font name (not .ttf file name) as the Location Data (Free 3 of 9 Regular, for example). Important: The font name is case sensitive, and it is cached in your session. If you need to correct the name, log off & on again so Appx will pick up the new name.
    Changed:
    <
    <
    • On you image define an alpha field with GUI Attributes:
    >
    >
    • On your image define a field and set these GUI Attributes:
     
      • Select the Control Type of Label
      • In Resource enter the application and name you set in the above step
      • Leave the Font blank
    Line: 42 to 42
     T REWRITE --- WIDGET FAIL 0

    The font will be embedded in the PDF document so the custom font should be viewable and printable on all systems whether the font is installed on the system or not.

    Added:
    >
    >

    Alternative Windows Font Installation

    If you followed the instructions above and the font failed to print this alternative set if installation instructions may work.

    • Place the font somewhere on your server. The default for Windows XP is C:\WINDOWS\Fonts for example.
    • From the cmd prompt or Run dialog box enter regedit (be very, very careful here, mistakes can disable your computer)
      • Navigate to HKEYS_LOCAL_MACHINE\SOFTWARE
      • Add new keys for PDFlib\PDFlib\7.0.3
      • Add a new string for searchpath
      • Double-click searchpath and enter the path to the directory where you placed the font file. If the font is placed in the default font file on Windows XP the entry would be c:\WINDOWS\Font. Multiple directories can be entered by separating them with a semicolon.
      • Exit regedit
    • Set the APPX environment variable APPX_USER_FONT_2 to the name of the font file without the .ttf extension. For example, to use the Free 3 of 9 barcode font the variable would be set to APPX_USER_FONT_2=free3of9
    • Log into APPX and select Application Design for the app you where you will be using the custom font.
    • On your image define a field and set these GUI Attributes:
      • Select the Control Type of Label
      • Leave the Font blank
      • Leave the Resource blank
      • Enter a name for the widget in the Name field (VENDOR BAR CODE in this example)
    • In the Pre-Display event point enter the following code:
          SET      --- WIDGET NAME                =      VENDOR BAR CODE
          READ     --- WIDGET                 HOLD 1 FT 0 BY WIDGET NAME
    T     SET      --- II                         =      11
    T     SET      --- WIDGET FONT                =  --- II
    T     REWRITE  --- WIDGET                 FAIL 0

    Please note that using this approach the value --- II is set to 11 rather than 10.

     

    Custom Fonts on a Unix or Linux Server

    Follow these instructions to install a custom font. This should also work in APPX 4.2.x. This example will refer to the Free3of9.ttf bar code font.

    Line: 52 to 77
     
      • Select the ROLLOVER SELECTED state
      • Set the Location Type to DESIGN FILE
      • Enter the font file name without the extension as the Location Data (free3of9, for example). Remember that file name are case sensitive. The font name is cached in your session. If you need to correct the name, log off & on again so Appx will pick up the new name.
    Changed:
    <
    <
    • On you image define an alpha field with GUI Attributes:
    >
    >
    • On your image define a field and set these GUI Attributes:
     
      • Select the Control Type of Label
      • In Resource enter the application and name you set in the above step
      • Leave the Font blank
    Line: 65 to 90
     T REWRITE --- WIDGET FAIL 0

    The font will be embedded in the PDF document so the custom font should be viewable and printable on all systems whether the font is installed on the system or not.

    Added:
    >
    >

    PDF Debug Logging

    If you are having trouble getting a custom font to print you can gather debugging information by setting the following environmment variable prior to starting an APPX session:

    set PDFLIBLOGGING=filename=c:\pdf.log enable remove classes={filesearch=9 api=2 resource=9}

    "enable" means that you want to enable logging
    "remove" means that you want PDFlib to remove any log file (of the same name) before starting
    The "classes" clause specifies the information you want to log (and the level of detail for each category)

    It would be helpful to include the log generated by this processs when reporting PDF output issues.

      -- GaryRogers - 2010-06-01 \ No newline at end of file

    Revision 42010-11-10 - JeanNeron

    Line: 1 to 1
     
    META TOPICPARENT name="APPXDeveloper"

    Defining Custom Fonts

    Line: 51 to 51
     
    • Select Name Resources and define a resource with:
      • Select the ROLLOVER SELECTED state
      • Set the Location Type to DESIGN FILE
    Changed:
    <
    <
      • Enter the font file name without the extension as the Location Data (free3of9, for example)
    >
    >
      • Enter the font file name without the extension as the Location Data (free3of9, for example). Remember that file name are case sensitive. The font name is cached in your session. If you need to correct the name, log off & on again so Appx will pick up the new name.
     
    • On you image define an alpha field with GUI Attributes:
      • Select the Control Type of Label
      • In Resource enter the application and name you set in the above step

    Revision 32010-11-10 - JeanNeron

    Line: 1 to 1
     
    META TOPICPARENT name="APPXDeveloper"

    Defining Custom Fonts

    Line: 28 to 28
     
    • Select Name Resources and define a resource with:
      • Select the ROLLOVER SELECTED state
      • Set the Location Type to SERVER FILE
    Changed:
    <
    <
      • Enter the font name (not .ttf file name) as the Location Data (Free 3 of 9 Regular, for example)
    >
    >
      • Enter the font name (not .ttf file name) as the Location Data (Free 3 of 9 Regular, for example). Important: The font name is case sensitive, and it is cached in your session. If you need to correct the name, log off & on again so Appx will pick up the new name.
     
    • On you image define an alpha field with GUI Attributes:
      • Select the Control Type of Label
      • In Resource enter the application and name you set in the above step

    Revision 22010-06-23 - JeanNeron

    Line: 1 to 1
     
    META TOPICPARENT name="APPXDeveloper"

    Defining Custom Fonts

    How to use custom fonts in PDF outputs

    Changed:
    <
    <
    Disclaimer: While these steps work in most cases this implimentation of custom fonts is not supported in APPX (not in 4.x or 5.x). Not all True Type fonts will work with PDF output. You may need to try different fonts to find one that works.
    >
    >
    Disclaimer: While these steps work in most cases this implementation of custom fonts is not supported in APPX (not in 4.x or 5.x). Not all True Type fonts will work with PDF output. You may need to try different fonts to find one that works.
     

    Overview

    Revision 12010-06-01 - GaryRogers

    Line: 1 to 1
    Added:
    >
    >
    META TOPICPARENT name="APPXDeveloper"

    Defining Custom Fonts

    How to use custom fonts in PDF outputs

    Disclaimer: While these steps work in most cases this implimentation of custom fonts is not supported in APPX (not in 4.x or 5.x). Not all True Type fonts will work with PDF output. You may need to try different fonts to find one that works.


    Overview

    When designing graphical images in APPX there are 9 fonts pre-configured with the Desktop Client that are part of the Java installation within the client. In order to use custom fonts not included with the installation, such as bar codes, there are a few steps that must be taken. Follow these steps and you should be able to make use of custom fonts on your PDF outputs. Again, not all custom fonts will work and you may have to try more that one font to find one that does work

    Custom Fonts on a Windows Server

    The easiest way to include a custom font is to install the font on your Windows server. The steps to install the font will be different depending on the desktop OS release. The steps below are for Windows XP Professional.

    • Save the font to somewhere on your desktop
    • Open the Windows Control Panel
    • Open the Fonts folder
    • From the File menu, choose "Install New Font..."
    • Use the Add Fonts selector to find the font
    • Click on OK. This will install the font.


    After you have installed a font you must tell Appx the name of the font, not the name of the font file. For example, the "Free 3 of 9" font is distributed in a file named "free3of9.ttf", but the name of the font is actually "Free 3 of 9 Regular". (you can also use "Free 3 of 9"). To find the font name, open the font file (free3of9.ttf) with Font Viewer (the easiest way to do that is to simply double-click on the font file in the Windows file manager).

    • Log into APPX and select Application Design for the app you where you will be using the custom font.
    • Select Name Resources and define a resource with:
      • Select the ROLLOVER SELECTED state
      • Set the Location Type to SERVER FILE
      • Enter the font name (not .ttf file name) as the Location Data (Free 3 of 9 Regular, for example)
    • On you image define an alpha field with GUI Attributes:
      • Select the Control Type of Label
      • In Resource enter the application and name you set in the above step
      • Leave the Font blank
      • Enter a name in the Name field (VENDOR BAR CODE in this example)
    • In the Pre-Display event point enter the following code:
          SET      --- WIDGET NAME                =      VENDOR BAR CODE
          READ     --- WIDGET                 HOLD 1 FT 0 BY WIDGET NAME
    T     SET      --- II                         =      10
    T     SET      --- WIDGET FONT                =  --- II
    T     REWRITE  --- WIDGET                 FAIL 0

    The font will be embedded in the PDF document so the custom font should be viewable and printable on all systems whether the font is installed on the system or not.

    Custom Fonts on a Unix or Linux Server

    Follow these instructions to install a custom font. This should also work in APPX 4.2.x. This example will refer to the Free3of9.ttf bar code font.

    • Place the font file (Free3of9.ttf) in the Resource directory for one of your applications.
    • Log into APPX and select Application Design for the app you where you will be using the custom font.
    • Select Name Resources and define a resource with:
      • Select the ROLLOVER SELECTED state
      • Set the Location Type to DESIGN FILE
      • Enter the font file name without the extension as the Location Data (free3of9, for example)
    • On you image define an alpha field with GUI Attributes:
      • Select the Control Type of Label
      • In Resource enter the application and name you set in the above step
      • Leave the Font blank
      • Enter a name in the Name field (VENDOR BAR CODE in this example)
    • In the Pre-Display event point enter the following code:
          SET      --- WIDGET NAME                =      VENDOR BAR CODE
          READ     --- WIDGET                 HOLD 1 FT 0 BY WIDGET NAME
    T     SET      --- II                         =      10
    T     SET      --- WIDGET FONT                =  --- II
    T     REWRITE  --- WIDGET                 FAIL 0

    The font will be embedded in the PDF document so the custom font should be viewable and printable on all systems whether the font is installed on the system or not.

    -- GaryRogers - 2010-06-01

     
    This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
    Ideas, requests, problems regarding TWiki? Send feedback