Set Print Parameter

This action allows you to fine tune the parameters that relate to the printer driver. These include parameters such as speed and darkness for label printers, or paper tray for laser printers.

Printer settings are applied to the current printout only and are not remembered during the upcoming event.

[Warning] Warning

Your parameters from Set Print Parameter action don't apply when you preview or reprint labels from your Control Center.

You can avoid this by saving your print parameters (printer properties) in your label template or your printer driver. Printer properties may differ from driver to driver and also from printer to printer.

[Note] Note

If you use Set Printer action to change the printer name, make sure the Set Print Parameter action is used right after. Before you can apply the DEVMODE structure to the printer driver, first load the default driver settings. This is done by the Set Printer action. The DEVMODE is only compatible with the DEVMODE of the same printer driver.

Print Parameters group allows action fine tuning before printing.

  • Paper bin: name of the paper bin that contains the label media. This option is usually used with laser and ink jet printers with multiple paper bins. The provided name of the paper bin must match the name of the bin in the printer driver. Check the printer driver properties for more details.

  • Print speed: defines printing speed. This setting overrides the setting defined with label. The provided value must be in the range of accepted values.

    Example 44. Example

    The first printer model accepts a range of values from 0 to 30, while the second printer model accepts values from -15 to 15. For more information, see printer driver properties


  • Darkness: defines the darkness of the printed objects on the paper and overrides setting from the label. The provided value must be in range of accepted values.

  • Print offset X: applies horizontal offset. The label printout will be repositioned by the specified number of dots in the horizontal direction. Negative offset can be defined.

  • Print offset Y: applies vertical offset. The label printout will be repositioned by the specified number of dots in the vertical direction. Negative offset can be defined.

[Tip] Tip

All print parameters can either be hard-coded or dynamically defined using an existing or a newly created variable.

Advanced group customizes the printer settings that are sent along with the print job.

UUID-bf707cd8-345b-68bb-f942-4270ce167106.png

Printer settings, such as printing speed, darkness, media type, offsets and similar, can be defined as follows:

  • Defined in a label

  • Recalled from a printer driver

  • Recalled from a printer at print time

The supported methods depend on the printer driver and its capabilities. Printing mode (recall settings from label or driver or printer) is configurable in the label design. You might need to apply these printer settings at print time – they can vary with each printout.

Example 45. Example

A single label should be printed using a variety of printers, but each printer requires slightly different parameters. The printers from various manufacturers don't use the same values to set the printing speed or temperature. Additionally, some printers require vertical or horizontal offset to print the label to the correct position. During the testing phase, you can determine the optimal settings for every printer you intend to use and apply them to a single label template just before printing. This action will apply the corresponding settings to each defined printer.


This action expects to receive the printer settings in a DEVMODE structure. This is a Windows standard data structure with information about initialization and environment of a printer.

Printer settings option applies custom printer settings. The following inputs are available:

  • Fixed-data Base64-encoded DEVMODE. In this case, provide the printer's DEVMODE encoded in Base64-encoded string directly into the edit field. If executed, the action converts the Base64-encoded data back into binary form.

  • Variable-data Base64-encoded DEVMODE. In this case, the selected data source must contain the Base64-encoded DEVMODE. Enable Data source and select the appropriate variable from the list. If executed, the action converts the Base64-encoded data back into the binary form.

  • Variable-data binary DEVMODE (available in Automation Builder). In this case, the selected variable must contain the DEVMODE in its native binary form. Enable Data source and select the appropriate variable from the list. If executed, the action uses the DEVMODE as-is, without any conversion.

    [Note] Note

    If the variable does not provide a binary DEVMODE, make sure that the selected variable is defined as a binary variable in the configuration.

[Note] Note

Make sure the Set Printer action is defined in front of this action.

Label settings overrides label properties defined in Label Properties in Designer. Use this option when you print your labels to a printer or media with different properties as defined in Label Properties in Designer. With this option you can:

  • Change your label dimensions (width and height).

  • Add or change label margins.

  • Disable cutter.

  • Disable batch printing.

  • Apply different stocks by changing Labels Across parameter (horizontal and vertical count, gaps, processing order).

  • Redefine Portrait or Landscape orientation.

  • Rotate labels by 180° degrees.

Automation applies Label settings at print time. Label settings parameters are not saved in your label templates. You can provide Label settings as an XML payload.

Sample Label settings XML

The sample below presents a structural view of the label settings and their attributes.

[Note] Note

Dimension units in XML correspond to your label design units (cm, in, mm, dot). You can change units in Designer if you go to Label Properties > Label Dimensions > Unit of measure.

Copy
<LabelSettings>
    <Width>100</Width>
    <Height>30</Height>
    <Margin>
        <Left>2</Left>
        <Right>3</Right>
        <Top>4</Top>
        <Bottom>5</Bottom>
    </Margin>
    <LabelsAcross>
        <Horizontal>
            <Count>2</Count>
            <Gap>4</Gap>
        </Horizontal>
        <Vertical>
            <Count>3</Count>
            <Gap>5</Gap>
        </Vertical>
        <ProcessingOrder>HorizontalTopRight</ProcessingOrder>
    </LabelsAcross>
    <Orientation>Landscape</Orientation>
    <Rotated>true</Rotated>
    <DisableCutter/>
    <DisableBatchPrinting/>
    <PaperType>Roll or Sheet</PaperType>
    <PaperName>A5</PaperName>
</LabelSettings>

Label settings XML specification

This section contains a description of the XML file structure to define Label settings parameters and values.

Copy
<?xml version="1.0" encoding="utf-8"?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:simpleType name="nonNegativeFloat">
    <xs:restriction base="xs:float">
      <xs:minInclusive value="0"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:element name="LabelSettings">
    <xs:complexType>
      <xs:all>
        <xs:element name="DisableCutter" minOccurs="0" maxOccurs="1">
          <xs:complexType>
            <xs:sequence/>
          </xs:complexType>
        </xs:element>
        <xs:element name="DisableBatchPrinting" minOccurs="0" maxOccurs="1">
          <xs:complexType>
            <xs:sequence/>
          </xs:complexType>
        </xs:element>
        <xs:element name="Width" type="nonNegativeFloat" minOccurs="0" maxOccurs="1"/>
        <xs:element name="Height" type="nonNegativeFloat" minOccurs="0" maxOccurs="1"/>
        <xs:element name="Margin" minOccurs="0" maxOccurs="1">
          <xs:complexType>
            <xs:all>
              <xs:element name="Left" type="nonNegativeFloat" minOccurs="0" maxOccurs="1"/>
              <xs:element name="Right"  type="nonNegativeFloat" minOccurs="0" maxOccurs="1"/>
              <xs:element name="Top"  type="nonNegativeFloat" minOccurs="0" maxOccurs="1"/>
              <xs:element name="Bottom" type="nonNegativeFloat" minOccurs="0" maxOccurs="1"/>
            </xs:all>
          </xs:complexType>
        </xs:element>
        <xs:element name="LabelsAcross" minOccurs="0" maxOccurs="1">
          <xs:complexType>
            <xs:all>
              <xs:element name="Horizontal" minOccurs="0" maxOccurs="1">
                <xs:complexType>
                  <xs:all>
                    <xs:element name="Count" type="xs:nonNegativeInteger" minOccurs="0" maxOccurs="1" />
                    <xs:element name="Gap" type="nonNegativeFloat" minOccurs="0" maxOccurs="1"/>
                  </xs:all>
                </xs:complexType>
              </xs:element>
              <xs:element name="Vertical" minOccurs="0" maxOccurs="1">
                <xs:complexType>
                  <xs:all>
                    <xs:element name="Count" type="xs:nonNegativeInteger" minOccurs="0" maxOccurs="1" />
                    <xs:element name="Gap" type="nonNegativeFloat" minOccurs="0" maxOccurs="1"/>
                  </xs:all>
                </xs:complexType>
              </xs:element>
              <xs:element name="ProcessingOrder" minOccurs="0" maxOccurs="1">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:enumeration value="HorizontalTopLeft"/>
                    <xs:enumeration value="HorizontalTopRight"/>
                    <xs:enumeration value="HorizontalBottomLeft"/>
                    <xs:enumeration value="HorizontalBottomRight"/>
                    <xs:enumeration value="VerticalTopLeft"/>
                    <xs:enumeration value="VerticalTopRight"/>
                    <xs:enumeration value="VerticalBottomLeft"/>
                    <xs:enumeration value="VerticalBottomRight"/>
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
            </xs:all>
          </xs:complexType>
        </xs:element>
        <xs:element name="Orientation" minOccurs="0" maxOccurs="1">
          <xs:simpleType>
            <xs:restriction base="xs:string">
              <xs:enumeration value="Portrait"/>
              <xs:enumeration value="Landscape"/>
            </xs:restriction>
          </xs:simpleType>
        </xs:element>
        <xs:element name="Rotated" type="xs:boolean" minOccurs="0" maxOccurs="1"/>
      </xs:all>
    </xs:complexType>
  </xs:element>
</xs:schema>