Variable Data

Variable Data

Variable Data is used to automatically fill a job with data from an external table file and dynamically create multiple jobs from it. This is done by specifying a template with variable elements in the JobComposer and then automatically filling these variable elements with data points from an external data source such as a .txt file or a .csv table.

Common applications for this are sports jerseys, where a variable field for the player name is placed on the shirt template. Using the data from the external file, it automatically generates all shirt variations based on the data source without requiring separate graphics file for each of them.

For use with automation, it is required to first set up the variable data template in the JobComposer. This template can then be called by name the XML File with <Image VardateTemplate=””> to load the job layout. Then, inside this <Image> tag, there are 3 different ways how the data points can be inserted into the template: By importing the data from a .csv or .txt file, by specifying the datapoints in the XML file with either the <VarData> format or the Legacy VarSet format.
 

Data Import by File

By importing the data from a .csv or .txt file using <VarData FileName=" "/>. This will use the content of the specified file into the XML file during processing and create instances of the variable data template for each datapoint/line in the file. A benefit of this method is that external files can interact with the .txt file to add or modify data instead of having to edit the XML file itself.


Please note that the datapoints in the file still need to be appropriately formatted for variable data. The first line of the txt file contains the header names, i.e. the names of the variable fields separated by tabs. Each line after represents one dataset for a Variable data job and the order of entries must be the same as the headers in the first line. For more details on variable data file format, see Variable Data.

Format: <Image VarDataTemplate=””></Image>

Sub Tag

Description

Possible Values

<VarData FileName=" "/>

Contains the file path to the .txt or .csv file with the data points for Variable Data.

File Paths e.g. C:\Data\VariableData.txt


Example for Variable Data with File Import
Quote
<HotFile>                                         
    <Job Name="Variable Data Job">                 
          <Image VardataTemplate="SportsJerseyTemplate">     
                 <VarData FileName="C:\Sports_Jersey\jersey.txt"/>
          </Image>                                           
     </Job>                                              
</HotFile> 


Data with <VarData>

By specifying the datapoints in the XML file using the new <VarData> format. The advantage of this method is that with no separate text file, it is more compact than the file method (All data is in the XML) and the format is clearer and more robust than the <VarSet> method.

With the <VarData method, the first segment <VDHeader> specifies the which variable fields are in the Variable Data Template i.e. which fields we will be filling with Data. <VDField> designates each variable field. <VDRow> specifies one line of data or one instance of the Variable Data Template.

Format: <Image VarDataTemplate=””></Image>

Sub Tag

Description

<VarData></VarData>

Enclosing Tag for the data segment, comes at the very beginning and the very end of defining the datapoints for variable data.

<VDHeader></VDHeader>Enclosing tag for the header section. <VDHeader> contains the names of the variable fields in the Variable Data Template and tells the HotFolder which fields you want to address and where to place each datapoint.
<VDField></VDField>Each VDField tag contains one name for a variable field in the Variable Data Template to let the HotFolder know which fields to fill.
<VDRow></VDRow>Enclosing tag for the Variable Data sets. Each <VDRow> tag represents one dataset, i.e. one complete image generated by variable data. One <VDRow> tag corresponds to one line in a Variable Data .txt file.
<VDValue></VDValue>Contains the individual datapoints for the Variable Data Template. Note that the <VDValue> tags need to go in the same order as the <VDField> tags in <VDHeader>, e.g. if the first <VDField> is “Order number”, the first <VDField> tag will need to be the order number so it goes into the correct variable field.

Example for Variable Data with the <Data> tag
Quote
<HotFile>                                            
<Job Name="Variable Data Job">                       
<Image VardataTemplate="SportsJerseyTemplate">      
<VarData>
    <VDHeader>
        <VDField>PlayerNumber</VDField>
        <VDField>PlayerName</VDField>
        <VDField>FrontLogo</VDField>
    </VDHeader>
    <VDRow>
        <VDValue>10</VDValue>
        <VDValue>Taylor</VDValue>
        <VDValue>C:\Sports_Jersey\eagle_logo.png</VDValue>
    </VDRow>
    <VDRow>
        <VDValue>33</VDValue>
        <VDValue>Bundy</VDValue>
        <VDValue>C:\Sports_Jersey\rhino_logo.png</VDValue>
    </VDRow>
    <VDRow>
        <VDValue>17</VDValue>
        <VDValue>Winslow</VDValue>
        <VDValue>C:\Sports_Jersey\eagle_logo.png</VDValue>
    </VDRow>
    <VDRow>
        <VDValue>55</VDValue>
        <VDValue>Banks</VDValue>
        <VDValue>C:\Sports_Jersey\rhino_logo.png</VDValue>
    </VDRow>
    <VDRow>
        <VDValue>76</VDValue>
        <VDValue>Lambert</VDValue>
        <VDValue>C:\Sports_Jersey\eagle_logo.png</VDValue>
    </VDRow>
    <VDRow>
        <VDValue>24</VDValue>
        <VDValue>Simpson</VDValue>
        <VDValue>C:\Sports_Jersey\rhino_logo.png</VDValue>
    </VDRow>
    <VDRow>
        <VDValue>29</VDValue>
        <VDValue>Conner</VDValue>
        <VDValue>C:\Sports_Jersey\eagle_logo.png</VDValue>
    </VDRow>
    <VDRow>
        <VDValue>15</VDValue>
        <VDValue>Tanner</VDValue>
        <VDValue>C:\Sports_Jersey\rhino_logo.png</VDValue>
    </VDRow>
    <VDRow>
        <VDValue>83</VDValue>
        <VDValue>Griffin</VDValue>
        <VDValue>C:\Sports_Jersey\eagle_logo.png</VDValue>
    </VDRow>
    <VDRow>
        <VDValue>42</VDValue>
        <VDValue>Wilkerson</VDValue>
        <VDValue>C:\Sports_Jersey\rhino_logo.png</VDValue>
    </VDRow>
</VarData>
</Image>                                           
 </Job>                                              
</HotFile>                                                                                                   


Data with <VarSet>

This is the old method of defining data points directly in the xml file using the <Varset> sub tag. It still works for legacy purposes but generally we recommend using the <VarData> method instead.

In the <Varset> sub tag, the first line designates the field names, separated by tabs. Each subsequent line is one dataset for one image. The data points are also separated by tab and their order corresponds to the field names in the first line. So the entry before the first tab will be the information for the first field, and so on.

You can also directly copy information from an exported dataset from the Variable Data function in the JobComposer, or use the JobComposer Variable Data feature to set up a template for the structure. When setting up Variable Data in the JobComposer and loading the template to create a job, you can enter data points directly in the Variable Data window. From there, use the Export button to create a .txt or .csv file with the correct structure and you sample data points. Then simply copy the structure from the exported file into the XML file.

When you load a Variable Data XML job into the HotFolder, it will process the variable data information and create one image for each line or data point in your <VarSet> list and load these into the job.

Format: <Image VarDataTemplate=””></Image>

Sub Tag

Description

Possible Values

<VarSet></VarSet>

Sets the data points to be used for Variable Data. First line should be line headings, same as in a Variable Data .txt file, each following line represents one dataset. Entries are tab separated.

E.g. Text1 SampleText


Sample for Variable Data
Quote
<HotFile>   
<Image VardataTemplate="TemplateName">
  <VarSet>
   Text1   Text2   Text3  
   Text1 for Image1       Text2 for Image1       Text3 for Image1
   Text1 for Image2       Text2 for Image2       Text3 for Image2
  </VarSet>
    <Scale Mode="HEIGHT" >100</Scale>
</Image>                   
</Job>
</HotFile>                                                                                                      


To use the downloadable example here, download the Variable Data Example Template and data file here. Copy the contents of the VarJobs folder to the corresponding folder in your Ergosoft RIP user data folder (Default C:\Users\Public\Documents\EsRip\16\Data\Template\VarJobs) and the folder Sports_Jersey the your C:/ directory so the images are located in C:\Sports_Jersey. This is necessary so the linked Variable Data Template and images are properly loaded into the job. You can of course also place the images in another directory, but then you’ll need to adjust the paths in the data points to the new image location.
    • Related Articles

    • Variable Data

      In digital printing there are many applications that require printing the same basic motif with just minor alterations or changed elements, such as sports jerseys with the same basic design but changing numbers and names for each shirt. One way to do ...
    • HotFile XML Variable Naming Convention

      The most common way to use Delta Automation XML is to build templates for the types of jobs you will be printing where the static parts are already defined and the dynamic parts that will be changed are defined as variables that can easily be ...
    • Print Mode (Handling of Rastered Data)

      Controls how the job is to be handled after being sent to the job queue. It consists of a a tag to identify the command, and On or Off attributes to turn the respective printmode on and off. The setting defined in the XML file itself overwrites the ...
    • DripTask Interface

      DripTask is the Ergosoft file interface that uses XML syntax to describe already color-managed and pre-ripped print jobs. DripTask print jobs can be submitted via the Ergosoft RIP HotFolder or directly via the Trickle RIP REST API. Both modules, ...
    • About Job Elements

      Job Elements These are configurable Elements that can be added to any Job to serve a multitude of functions. Job Elements include customizable barcodes, text fields, rectangle, separation lines. Once added, Job Elements can be edited and manipulated ...