Ergosoft Delta Automation XML Basics

Ergosoft Delta Automation XML Basics

Introduction

Ergosoft Delta Automation uses the XML markup language to provide a powerful and versatile way for third party applications to interact with the Ergosoft RIP. By creating print jobs in the XML format, third party applications like web shops, warehouse management systems or simplified print UIs can dynamically create custom jobs on the fly according to specifications by customers or operators.

Using XML as the language for the job definition makes it easy to understand the format and settings and lets developers hit the ground running implementing Delta Automation as the markup is human readable and they only need to look up the specific commands for the functions they require.

In its basic form, Delta Automation XML uses only 3 types of commands:

Tags (Elements): Are blocks of instructions for the RIP and control different features. They are the main instructions for the RIP on how it should create a job. Tags begin with a start tag <> and end with an end tag </>.

Attributes: Are modifiers to tags. They are defined inside the start tag and contain instructions on how the tag should be interpreted, for example <Job NumCopies=”3”> where <Job> is the tag, and NumCopies is the attribute that specifies that 3 copies of the job should be printed. They are mostly optional, but there are some exceptions where they are required for a tag to function.

Sub-Tags (Child Elements): Are parameters specified inside a tag. They are used to specify settings for the feature that is controlled by the parent tag. A tag may have several sets of sub tags to control different aspects of the feature. For example, the <Image> tag may have a <Scale> sub tag that specifies the output size for the image. As the <Scale> tag relates to the parent <Image> tag, it is specified inside the <Image> tag, i.e. before the end tag </Image>. Sub tags in general only affect their parent element, but not any other parts of the job.


Of course, in a specialized program such as the Ergosoft RIP there are a lot of features, there are many many different tags to control the different functions. This is also what makes Delta Automation so powerful, because it can control almost all of the RIP functions using markup code, so nearly every type of job can be created or altered on the fly.

There are 2 types of jobs in Delta Automation XML: Single Image jobs, and multi-image jobs. They are very similar in Syntax, and usually it is best practice to use the multi image job variant, but single image jobs have some uses as well.


Single Image Job

As the name suggests, a single image job is a job containing only one image. This can be useful if you intend to use the HotFolders nesting settings or the “Start printing when job length greater than” feature to accumulate images before beginning a print.

To build any XML Job, we have to start with the <HotFile> tag. This is the root element that must encompass all parts of the XML job, as it lets the HotFolder know that it should process this as XML.

In a single image job, we can go straight to the <Image> tag itself that lets us add an image to the job. For <Image>, we need to use the FileName attribute that lets us specify the path to the image file we want to add.

If we want to scale, rotate, or otherwise edit the image, we can do so using sub tags, such as <Scale> and <Rotate>. So we specify the <Image> tag and any sub tags we might want to use to modify the image such as scaling, etc. When we have specified all our sub tags we close the tag with </Image>.

Since this is a single image job, theres nothing else for us to do but end the file with </HotFile>.

So a simple single image job could look something like below. This will create a job with one image scaled to to 20cm width as seen on the right.

Quote
<HotFile>
        <Image FileName="C:\images\lizard.tif">
     <Scale Mode="WIDTH" Value="200" />
   </Image>
</HotFile> 



Multi Image Job

In most cases it is best to use Multi Image jobs, even if you only add a single image, as they are the more versatile form and the <Job> tag allows us some special functions.

To build any XML Job, we have to start with the <HotFile> tag. This is the root element that must encompass all parts of the XML job, as it lets the HotFolder know that it should process this as XML.

Inside the <HotFile> element, we can then open a <Job> element to begin specifying what goes to print. The <Job> tag begins the print job and contains all specification for the job. This can be instructions such as applying a position template for the job using <PositionTemplateName>, specifying a specific Print Environment to print the job with, adding multiple images to a job, etc.

Inside the <Job> tag comes the content of the job. Everything that should be printed in this job goes inside the job tag. At least, we’ll want to add some images to print to our job using the <Image> tag. For <Image>, we need to use the FileName attribute that lets us specify the path to the image file we want to add.

If we want to scale, rotate, or otherwise edit the image, we can do so using sub tags, such as <Scale> and <Rotate>. So we specify the <Image> tag and any sub tags we might want to use to modify the image such as scaling, etc. When we have specified all our sub tags we close the tag with </Image>.

Once we have the content defined, we close the tag using </Job> and close the HotFile tag using </HotFile>.

So a simple single image job could look something like show below. On the left side you see the XML code, while on the right side you see the resulting output.

Quote
<HotFile>
                <Job Name=”Basic Job Multi Image”>
<PrintEnvMedia>
                                              <PrintEnv>Your Print Environment</PrintEnv>
</PrintEnvMedia>
                               <Image FileName="C:\images\lizard.tif">
              <Scale Mode="WIDTH" Value="200" />
                        </Image>
<Image FileName="C:\images\chair.tif">
              <Scale Mode="WIDTH" Value="400" />
                        </Image>                                              
                </Job>
 </HotFile>


In this example we are opening the job using the <Job> tag with the Name attribute to set a name for the job. This is the name the Job will displayed with in our PrintQueues.

We then use the <PrintEnvMedia> tag to specify one of our Print Environments that we want to use to print the job. This tag is entirely optional. If you do not specify a Print Environment in the XML job, it will be printed with the Print Environment configured in the HotFolder. Note that Tags specified outside specific image tags usually apply to the entire job, while tags inside an image tag usually only apply to the image.

Next we add two images to the Job. We add the lizard.tif image first and scale it to 20cm width, then we add the chair.tif image and scale it to 40cm width.

When we are done, we close the </Job> and </HotFile> tags to finish up the Job.


Files to be processed with Delta Automation need to be saved in the .xml format. Once you have set up your job and saved it as .xml, simply drop it into the surveyed folder of your HotFolder to see it in action!

You can also find many more application examples of XML files throughout this documentation section by checking out the individual tag articles.
    • Related Articles

    • What is Delta Automation?

      In the fast-evolving landscape of digital printing productions, automation is quickly evolving from novelty to necessity. Automating print production to streamline processes from customer input to print output saves manual work, time and eliminates ...
    • Delta API

      The <delta> webservice is a RIP REST API that uses JSON as a data-interchange format. It uses .NET (Core 6) C#. Each PC hosting an Ergosoft RIP has an independent instance of <delta> installed. The <delta> REST API is connected to the Ergosoft RIP ...
    • Exporting XML Reference from Ergosoft RIP

      While there currently isn’t a way to directly export entire jobs into the delta automation format, there are several features of the RIP that can be used to generate and export files that use the same syntax as delta automation for use as reference. ...
    • 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 ...
    • Implementation Support through Ergosoft

      Implementing Automation can be a complex task. ErgoSoft offers its assistance both in the application of digital printing principles and practices as well as in how to introduce automation to a workflow and how existing workflows can be adapted to ...