LiveCycle Forms ES: Select which fonts get embedded at render-time

Issue

If you would like to control which fonts should be embedded in the final PDF when rendered using LiveCycle Forms ES, then please follow the steps below.

Reason

This could be a common requirement if you are producing PDF documents for multiple environments:

  1. the internal environment, where the user’s systems have all of the fonts available already
  2. the external environment, where you would need the additional fonts to be embedded

At render-time, you know which environment is making the call, but do not know how to control the fonts which are getting embedded.

Solution

The XCI file, or XCI options string in FormsIVS, is what controls the render options used by Forms. To control what fonts are embedded, you must create your own custom XCI file, and pass that as a parameter to the renderPDFForm method, or as an option to FormsIVS. There are two options which you can use in the XCI file to control what fonts get embedded (alwaysEmbed), or what fonts do not get embedded (neverEmbed).

1. Copy the default pa.xci file and create a custom.xci file (for the purposes of this example, we will assume you create the custom.xci file on the root of the D drive)

2. Set the value for alwaysEmbed/neverEmbed as follows in the custom.xci file:

<fontInfo>
<alwaysEmbed>[fontName1],[fontName2]</alwaysEmbed>
...
</fontInfo>

3. Call the renderPDFForm method setting the XCIURI property, or FormsIVS with the following parameter in the options String:

&XCIURI=file://D/custom.xci

or on some platforms:

&XCIURI=D/custom.xci

By editing the custom.xci file manually you will be able to generate PDF files controlling the fonts which are embedded. You could generate multiple XCI files for various environments and just call the respective XCI file to use for each document.

VN:F [1.9.22_1171]
Was this helpful? Please rate the content.
Rating: 9.0/10 (1 vote cast)