Using Custom Scripts

You may use scripts to achieve the desired effect, or to perform certain production-oriented tasks, such as changing the color mode or resolution, scaling, cropping, etc. A script may be executed either before or after the automatic personalization of the text and graphics.

For example, some effects require rasterizing layers, but uImage can only work with vector layers. To solve this problem, use a script as follows:

  1. Save the template in its pre-rasterized state.

    This state enables uImage to replace the tags with dynamic content.

  2. Create a script that rasterizes the relevant layers.

  3. In your uImage QLingo function call (Image.CreateIllustration2, defined in the Plan file or in the uImage content object expression in uCreate Print), specify the full path to your JavaScript file using the SCR parameter.

    The tag names and values for each recipient are automatically passed to the script. This feature allows you to use your script in different ways, depending on the recipient values. For example, you can create different design effects for members of different clubs.

  4. State that this script should be executed after the tags are replaced with recipient-specific values.

For more information on how to integrate scripts into uImage function calls, see Using Scripts and Actions in uImage Calls.