Frame Options

Introduction

The Post Population pane in Field Options provides options for image frames and text fields.

For image frames, you can assign alternative text (“Alt Text”) for PDF export, helping create accessible PDFs. For both image and text fields, you can specify an ExtendScript that runs after EasyCatalog populates the field.

Object Export Options

Note: Alt Text applies to image frames only.

The alternative text applied to the frame is defined using EasyCatalog’s Custom Field commands. For example, to use the contents of the My Alt Text field:

This is equivalent to selecting Object > Object Export Options > Custom as the Alt Text source in InDesign.

Post Population Script

For image fields, the script runs after the frame is populated. For text fields, it runs after the field is inserted or its content is updated.

The script receives the populated target in arguments[0]:

  • Image field: the populated frame.
  • Text field: the field’s text range, excluding EasyCatalog’s field markers.

Text post-population scripts run when content is inserted or changed. They do not run when an update leaves the content unchanged.

Without the Scripting Module:

Example: Formatting an Image Frame

Example: Formatting a Text Field
This example sets the first word to 24 points and the remaining text to 18 points. For Aperture Downlights, “Aperture” becomes 24pt and “Downlights” becomes 18pt:

With the Scripting Module installed:
Two additional arguments are supplied:

This image-frame example reads the stroke weight from another field in the same record:

The Scripting Module also provides ecApplyProperties() on text objects. This applies EasyCatalog CSS-style property declarations:

Using a Script File

For more complex scripts, place a script file in the data source’s Scripts folder and reference it with an include directive:

Example: Scaling a Barcode

This image-frame script enlarges the barcode content by 20% and centres it within its frame:

Script Errors

Errors from text post-population scripts are written to the EasyCatalog log with the prefix [POST POPULATION SCRIPT]. Logging must be enabled to record these errors.