Skip to main content
Version: 2027 R1

Print a barcode label

This action allows you to print a label with a barcode.

Basic configuration​

The Basic tab of the Properties panel holds settings shared by every action in an automation: the Active switch, the Action type field, the Documentation field, the Use action template switch (when enabled, the action takes its configuration from the selected action template defined in the process), the Execution condition section (decides whether the action always runs or only when a custom rule is met), and the Runtime error handling section (the message and numeric error code returned when the action fails). Since these settings are not unique to the Print barcode action, they are described in detail in the Actions chapter.

Basic tab in the Properties panel of the Print barcode action

Advanced configuration​

The Advanced tab holds fields specific to this action: Printer, Quantity, Encoding, Template, and Mode.

Advanced tab in the Properties panel of the Print barcode action

1. Printer​

The type of barcode printer used to print the label:

  • Main - the primary barcode printer. Its name should be given in the format: \computer name\printer name.
  • Accounting - an alternative, second barcode printer at the registration point.

2. Quantity​

The number of labels to print. The parameter can be defined using a dynamic value, e.g. by pointing to a form field's value.

3. Encoding​

The encoding system used to create the barcode:

  • ANSI - ANSI character encoding.
  • UTF-8 - UTF-8 character encoding.

4. Template​

The appearance template for the barcode label. The template content can be built dynamically using the rule designer available under the fx icon.

The table below shows the configuration package sent to the printer:

CodeMeaning
I8,B,001Print encoding setting (8 data bits, Windows 1250 Latin 2, country code USA)
rYDouble buffering mode setting
JF"Top-down" printing setting
WYEnables support for escape sequences for Windows characters (newline character "\n")
S1Sets the print speed to 1.5 ips (37 mm/s)
D14Sets the print darkness to 14 (0 = invisible, 15 = darkest)
R24,0Sets the print margins (24 points from the left edge, 0 from the top)
ZBSets the print orientation (B means printing from the bottom of the buffer)
UNDisables error reporting
q448Sets the print width to 448 points
Q468,21Sets the print length to 468 points, and the spacing between labels
NClears the print buffer
Example

Label content:

A30,10,0,1,1,1,N,"Author: John Smith
A30,36,0,1,1,1,N,"Date: YYYY-MM-DD"

The table below explains the commands used in the example above:

CodeMeaning
30Horizontal distance from the left edge.
10Vertical distance from the top edge, i.e. the top margin. For each new line, a letter height value (1 = 12 points, 2 = 16, 3 = 20, 4 = 24, 5 = 48, respectively) and the spacing between lines are defined.
0Rotation by 0 degrees.
1Font size selection (12 points).
1Font height multiplier.
1Font width multiplier (corresponds to the width in points: 1 = 8, 2 = 10, 3 = 12, 4 = 14, 5 = 32, respectively).
NPrints images in the standard way (they can also be flipped).

The configuration field (label height) is used to calculate whether the printed text fits on a single label. If the height is exceeded, the text is moved to the next label — the gap between labels is added at this point as well.

The same applies to new lines: a word is moved to the next line when the sum of the letter widths is greater than the calculated value — 400 points from the left to the right margin by default.

5. Mode​

The barcode printing mode:

  • Synchronously - running the action holds up further processing of the automation until printing finishes.
  • Asynchronously - printing is dispatched in the background, and the automation moves on to the next action without waiting for it to finish.

6. Variables editor (fx icon)​

Clicking the fx icon inside the Template field opens a full-screen rule designer — a visual formula editor where the template content can be built dynamically using variables available in the current Designer Studio location.

info

Additional information on the action and its use is available on the technical blog in the articles::