User Manual – Durst

2.6 Variable Images

Updated on

In this article, you will learn

  • how to create variable images without uploading a CSV file,
  • how to use variable images based on a CSV file,
  • which requirements must be met to create variable images, and
  • which parameters are available for the placement of images.

1. General

An image can contain various types of content - pixel information, vectors, text, or a combination of all. In the following, the term variable image refers generally to any graphical representation. In practice, variable images are most commonly used in the following application areas:

  • ID cards – for personalizing the photo of the passport.
  • Access Authorizations – for placing encrypted barcodes or QR codes generated by an external application.
  • License Plates – for placing a federal or state emblem in combination with a unique number.
  • Visitor Badges – for placing passport photos and specifically encoded QR codes created in an external application.
  • Packaging – for personalizing cake or chocolate packaging.
  • Labels – for personalizing wine or beer labels.

The range of applications for variable images is extensive. In many cases, variable images are used purely for design purposes or to create unique items. The use of variable images offers a wide array of creative possibilities.

1.1. File Types

It should be noted that not all file types can be used for variable images in the VDP Editor. However, the color space used in the images is irrelevant. The following file types are supported under the specified requirements:

  • .jpg – JPEG files of any compression level
  • .png – PNG files; alpha channels are also evaluated
  • .tif / .tiff – TIFF files; alpha channels are also supported. Photoshop setting layers should be avoided, as complex constructions may lead to unexpected results in the output
  • .svg – SVG files in SVG 1.1; any images used within the SVG file must be embedded using base64 encoding, and the viewBox must be defined
  • .pdf – PDF files

1.2. Preparations

Before you can use variable images in the VDP Editor, the following preparations must be made on the Workflow server and within the Workflow itself:

  1. File Type – save the images in a supported file format.
  2. Location – create a directory on the server where the Workflow is installed, or in a directory that the Workflow has access to.
  3. Copying of Variable Images – copy the variable images into the previously created directory.
  4. Set Up a Share – make the created directory accessible to the Workflow. For more details, refer to the article Set up and manage Shares.

2. Create Variable Images

Once the preparations are complete, you can start creating a variable image in the VDP Editor. The following example describes how to create a variable image that is proportionally scaled and centered both horizontally and vertically within the placeholder. Proceed as follows:

  1. Select the desired Article or Print Item in the Workflow.
  2. Start the VDP Editor. The selected Print Item will be displayed in the VDP Editor, and the tab Transform & General Settings [2] will already be active for subsequent steps.
  3. Click on Upload/Replace CSV File [5] to upload a CSV file and complete the upload process. Afterwards, the file name [4] of the CSV file should appear under Global Settings – File Name.
  4. Click on the icon Select Folder [6] to choose the path to the folder where the variable images are stored.
  5. Start creating variable images by selecting the VDP Image Tool [1] from the toolbar and drawing the appropriate placeholder frame [3] onto the Print Item.

Figure 1: The VDP Editor with an uploaded CSV file and its configured path to the Image Directory

  1. After releasing the mouse button, a left-aligned dummy image will be displayed within the placeholder frame [8].
  2. Additionally, a warning message [7] will appear, informing the user that no image with the file name Sample Content could be found in the directory. This warning can be ignored, as the desired data source will be selected in the next step.

Figure 2: The VDP Editor with a placeholder image of a variable image

  1. In order to assign the correct file name of the image to the placeholder frame, switch to the tab Content [9].
  2. In the field Data Source, select either the option Column Title [10] or Column Index, and then choose the corresponding Column Header [11] – in our example, IMAGES – in the option Column Title/Column Index.
  3. If the entry in the first data record of the IMAGES column in the CSV file matches a file name of the selected image directory, the dummy preview will be replaced by the corresponding image preview [12] within the placeholder frame. The size, alignment, and position of the image will match the previously displayed dummy preview.

Figure 3: The VDP Editor with the preview image of the first data record from the CSV file

Incorrect File Type

If the image content refers to a file type that is not supported, an appropriate warning message will be displayed.

  1. As the final step, you can define the position and scaling of the image within the placeholder frame. To do this, navigate to the tab Format [13].
  2. Select the Blend Mode [14]. In this example, the option Normal was chosen.
  3. In the section Image Settings [15], configure the following parameters:
    • Select the icons centered for both options Align horizontally centered [16] and Align vertically centered [17], and
    • Choose Fill Image - keep proportions in the Image adjustment options [18].

Figure 4: The VDP Editor with the fitted variable image

  1. Check a few subsequent data records to ensure that the selected image adjustment displays the correct image section for all images.
  2. Once the verification is complete, save the VDP specification by clicking the button Save.

3. Special Features

A few specific features are available when working with variable images.

The following section provides a detailed description of all available options that can be used for variable images.

3.1. Image Fit

The most essential configuration options are found in the section Image Settings under the tab Format. The following options are available for fitting variable images:

Horizontal Alignment

The option Horizontal Alignment [19] allows you to align the image within the placeholder frame to the left, center, or right.

Figure 5: Illustration of the available settings in the option Horizontal Alignment with Fit Image - keep proportions in the Image adjustment options

Vertical Alignment

The option Vertical Alignment [20] allows the image to be aligned within the placeholder frame at the top, center, or bottom.

Figure 6: Illustration of the available settings in the option Vertical Alignment with Fit Image - keep proportions in the Image adjustment options

Image adjustment options

The Image adjustment options allow you to define how the image should be adjusted within the placeholder frame – either proportionally fitted, proportionally filled, or distorted to fit. The following options are available:

Fit Image - keep proportions [21] – the image is scaled proportionally to fit inside the frame so that the entire image remains visible. Depending on the horizontal or vertical alignment of the image within the placeholder frame, unprinted (transparent) areas may appear within the frame. These are illustrated in Figure 5 and Figure 6.

Fill Image - keep proportions [22] – the image is scaled proportionally to fill the entire height or width of the placeholder frame. As a result, the frame is completely filled with the image, but parts of the image may be cropped depending on the Alignment Settings.

Figure 7: Illustration of the possible outcomes for the option Horizontal Alignment with Fill Image - keep proportions in the option Image adjustment options

Stretch

The image is distorted to completely fill the placeholder frame, regardless of its original proportions. When the option Stretch [23] is selected, the settings for Horizontal Alignment, Vertical Alignment, and the Image adjustment options are disabled, as they are not applicable.

Figure 8: The image has been stretched to fill the entire frame

3.2. Add Static Image

To insert a static image as a graphic object in the background when creating a variable job, it is recommended to use the placeholder frame for a variable image. Proceed as follows to insert a static image:

  1. Save the desired image in the selected Image Directory that you specified under the tab Transform & General Settings.
  2. In the tab Layers, select the VDP on highest layer and use the VDP Image Tool to create the desired placeholder in the required size and position. In the example shown in the figure below, the placeholder frame extends beyond the ImageBox in order to allow the image to be printed with Bleed. For this reason, a warning is displayed indicating that a variable element overlaps the dimensions of the final format.
  3. Navigate to the tab Content [24].
  4. Under the option Data Source, select the entry String [25].
  5. In the input field String [26] enter the file name of the image to be placed, including the file extension, and then click Update [27].
  6. Finally, in the tab Format, adjust the image fitting as needed.

Figure 9: The Print Item was supplemented with a static background image

3.3. Insert Variable Images via a Dynamic String

If you want to use a series of variable images in a VDP job, in practice a CSV file is typically created manually for this purpose, containing a single column with image file names. These image names are usually numbered sequentially – e.g., Image_001.jpg, Image_002.jpg, Image_003.jpg or Image_001.jpeg, ... etc.

However, the mapping of image data with a sequential number can also be done directly in the VDP Editor without the need to create a CSV file. Proceed as follows:

  1. Save the desired images in the Image Directory you selected under the tab Transform & General Settings.
  2. Use the VDP Image Tool to create the desired placeholder in the required size and position (don't forget to choose VDP on lowest layer in the tab Layer).
  3. Navigate to the tab Content [28].
  4. In the option Data Source, select the entry String [29].
  5. In the input field String [30] enter the text Image, and then click Insert placeholder [32].
  6. In the dialog that appears, choose the option Serial Number. This will insert the following string: ${serial_number; start=1; width=1; batch_count=0; repeat_count=0; increment=1}.
  7. Click inside the placeholder text to display the input fields for defining a serial number. Then enter the value «1» in the input field Width [33]. For example, if you enter the value «3» two leading zeros will be added for single-digit numbers, one leading zero for double-digit numbers, and no leading zero for triple-digit numbers.
  8. Then add the suffix of your images files e.g. .pdf at the end of the string. This will result in the following string: Bild_${serial_number; start=1; width=3; batch_count=0; repeat_count=0; increment=1}.pdf.
  9. Click Update [29] to transfer the complete string to the VDP Editor and execute it.
  10. Finally, switch to the tab Format to adjust the image fitting as needed.

Figure 10: The Print Item with a dynamic background image based on a String containing a Serial Number

Article update: Workflow 1.19.2 – 05/2025

Previous Article 2.5 Serial Numbers
Next Article 2.7 Variable Fill or Stroke Color
Still Need Help? Contact Us