目前还没有官方翻译。

[en] Set Printer

[en] This action specifies the name of the printer to be used for printing the active label.

注意

[en] This action overrides the printer selected in the label properties.

[en] This action is useful when printing an identical label on multiple printers. Always nest this action under the Open Label action to provide the label with the reference for the preferred printer.

[en] This action reads the default settings (such as speed and darkness) from the selected printer driver and applies them to the label. If you don't use the Set Printer action, the label gets printed using the printer defined in the label template.

警告

[en] Pay attention when switching the printers, e.g. from Zebra to SATO, or even from one printer model to another model of the same brand. Printer settings might not be compatible and the label printouts might not appear identical. Also, label design optimizations for original printer, such as internal counters, and internal fonts, might not be available on the newly selected printer.

[en] Printer group specifies the printer name to be used for the current print job.

  • [en] Printer name: select it from the list of locally installed printer drivers, or manually enter a printer name. Select Data source to dynamically select the printer using a variable. If enabled, select or create a variable that contains the printer name which is used if the action is run.

[en] Set Print Job Name

[en] This action specifies the name of the print job file as it appears in the Windows Spooler. A default print job name is the name of the used label file. This action overrides it.

注意

[en] Always nest the action under the Open Label action, so it applies to the adequate label file.

[en] Print Job group defines the print job name.

  • [en] Name: sets the print job name. It can be hard-coded, and the same name is used for each print action. Variable enables a variable file name. Select or create a variable that contains the path and/or file name if the event happens or a trigger fires.

    注意

    [en] In Automation Builder module, the variable value is usually assigned by a filter.

[en] Redirect Printing to File

[en] This action diverts the print job to a file. Instead of sending the created print file to a printer port as defined in the printer driver, the printout is redirected to a file. You can append data to an existing file, or overwrite it.

[en] This action enables you to capture printer commands in a separate file.

[en] The action instructs Automation Builder module to redirect printing – as a result, the labels are not going to be printed. Make sure the action is followed by the Print Label action.

注意

[en] NiceLabel Automation runs as service under defined Windows user account. Make sure this user account has privileges accessing the specified folder with read/write permissions. For more information, see section Access to Network Shared Resources in the NiceLabel Automation user guide.

注意

[en] Redirect Printing to File action is useful for printing several different labels (.NLBL files) to a network printer while retaining the correct order of labels. If multiple .NLBL files are printed from the same trigger, Automation Builder sends each label to the printer in a separate print job, even if the target printer is the same for both labels. If a network printer is used, job of another user can be inserted between two jobs the trigger must send together. Using this action, you can append print data into the same file and send its contents to the printer using the Send Data to Printer action.

[en] File group of settings defines how the file selection for redirecting is done.

  • [en] File name:specifies the file name. It can either be hard-coded or dynamically defined using an existing or a newly created variable.

    [en] Use UNC syntax for network resources. For more information, see section Access to Network Shared Resources in NiceLabel Automation user guide.

注意

[en] When using this action, make sure your user account has sufficient privileges for accessing the specified folder with read/write permissions.

[en] File write mode group of settings selects how the file is treated in case of repeated redirects.

  • [en] Overwrite the file: if the specified file already exists on the disk, it is going to be overwritten.

  • [en] Append data to the file: the job file is added to the existing data in the provided file.

[en] Persistence group controls the continuity of the redirect action. It defines the number of Print Label actions that are affected by the Redirect Printing to File action.

  • [en] Apply to next print action: specifies for the print redirect to be applicable to the next Print Label action only (single event).

  • [en] Apply to all subsequent print actions: specifies for the print redirect to be applicable to all Print Label action defined after the current Redirect Printing to File action.

注意

[en] The action only redirects printing. Make sure it is followed by the Print Label action.

[en] Set Print Parameter

[en] 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.

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

警告

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

[en] 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.

注意

[en] 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.

[en] Print Parameters group allows action fine tuning before printing.

  • [en] 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.

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

    例 41. 示例

    [en] 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


  • [en] 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.

  • [en] 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.

  • [en] 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.

提示

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

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

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

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

  • [en] Defined in a label

  • [en] Recalled from a printer driver

  • [en] Recalled from a printer at print time

[en] 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.

例 42. 示例

[en] 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.


[en] 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.

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

  • [en] 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.

  • [en] 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.

  • [en] 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.

    注意

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

注意

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

[en] 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:

  • [en] Change your label dimensions (width and height).

  • [en] Add or change label margins.

  • [en] Disable cutter.

  • [en] Disable batch printing.

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

  • [en] Redefine Portrait or Landscape orientation.

  • [en] Rotate labels by 180° degrees.

[en] 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.

[en] Sample Label settings XML

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

注意

[en] 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.

<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>

[en] Label settings XML specification

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

<?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>

[en] Redirect Printing to PDF

Enterprise.png

[en] This action diverts the print job to a PDF document. The created PDF document retains the exact label dimensions as defined during the label design process. The rendering quality of graphics in the PDF matches the resolution of the target printer and desired printout size.

[en] Print stream data can be appended to an existing file, or it may overwrite it.

[en] The action instructs NiceLabel 10 to redirect printing – as a result, the labels are not printed. Make sure the action is followed by the Print Label action.

注意

[en] NiceLabel Automation module runs as service under defined Windows user account. Make sure this user account has privileges accessing the specified folder with read/write permissions. For more information, see section Access to Network Shared Resources in NiceLabel Automation user guide.

[en] File group defines the redirect file.

  • 文件名:指定将打印作业定向到的文件名称。如果是硬编码,打印每次都重定向到指定的文件。要进行动态定义,请使用现有变量或创建新变量。

  • 改写文件:如果磁盘上已存在指定的文件,则覆盖(默认选择)。

  • 附加数据至文件:将作业文件附加到所提供文件的现有数据中(默认取消选择)。

  • 在 PDF 中嵌入字体:如果您使用某些非标准字体,您的解决方案可能会在无此字体的计算机上生成不同的 PDF 输出。启用在 PDF 中嵌入字体选项后,即可将非标准字体嵌入到您的解决方案中,您的解决方案会在所有计算机上创建相同的 PDF。

    在 PDF 中嵌入字体选项可创建符合存档 (PDF/A) 文档的 PDF。无论您使用什么软件,PDF/A 标准可确保以完全相同的方式复制您的文档。将显示图像、字体和颜色信息等内容所需的信息嵌入到您的 PDF 文件中。

    注意

    启用此选项时保存输出 PDF 文件会占用更多空间。

[en] Persistence group allows controlling the persistence of the redirect action. Define the number of Print Label actions that are affected by the Redirect Printing to File action.

  • [en] Apply to next print action: specifies for the print redirect to be applicable to the next Print Label action only (single event).

  • [en] Apply to all subsequent print actions: specifies for the print redirect to be applicable to all Print Label action defined after the current Redirect Printing to File action.

[en] Printer Status

[en] This action communicates with the printer to acquire its real-time state, and contacts the Windows Spooler for additional information about the printer and its jobs.

[en] As a result, the information about errors, spooler status, number of jobs in the spooler is collected. This uncovers potential errors and makes them easy to identify.

注意

[en] Possible use case scenarios. (1) Verifying the printer status before printing. If the printer is in an error state, you print the label to a backup printer. (2) Counting the number of jobs waiting in a spooler of the main printer. If there are too many, you will print the label to an alternative printer. (3) You will verify the printer status before printing. If the printer is in an error state, you will not print labels, but report the error back to the main system using any of the outbound actions, such as Send Data to TCP/IP Port, Send Data to HTTP, Execute SQL Statement, Web Service, or as the trigger response.

[en] Live Printer Status Prerequisites

[en] To make live printer status monitoring possible, follow these instructions:

  • [en] Use the Loftware Printer Driver to receive detailed status information. If using any other printer driver, you can only monitor the parameters retrieved from the Windows Spooler.

  • [en] The printer must be capable of reporting its live status. For the printer models supporting bidirectional communication see NiceLabel Download web page.

  • [en] Printer must be connected to an interface with support for bidirectional communication.

  • [en] Bidirectional support must be enabled in Control Panel > Hardware and Sound > Devices and Printers > driver > Printer Properties > Ports tab > Enable bidirectional support.

  • [en] If using a network-connected label printer, make sure you are using Advanced TCP/IP Port, not Standard TCP/IP Port. For more information, see the Knowledge Base article.

[en] Printer group selects the printer.

  • [en] Printer name: specifies the printer name to be used for the current print job.

    [en] You can select a printer from the list of locally installed printer drivers, or you can enter any printer name. Data source enables variable printer name. When enabled, select or create a variable that contains the printer name when a trigger is executed or an event takes place. Usually, the variable value is assigned by a filter.

[en] Data Mapping group sets the parameters that are returned as a result of the Printer Status action.

警告

[en] Most of the following parameters are only supported with Loftware printer drivers. If you are using any other printer driver, you can use only the spooler-related parameters.

  • [en] Printer status: specifies the printer live status formatted as a string.

    [en] If the printer reports multiple states, all states are merged into a single string, delimited by comma ",". If there are no reported printer issues, this field is empty. Printer status might be set to Offline, Out of labels or Ribbon near end. Since there is no standardized reporting protocol, each printer vendor uses proprietary status messages.

  • [en] Printer error: boolean (true/false) value of the printer error status.

  • [en] Printer offline: boolean (true/false) value of the printer offline status.

  • [en] Driver paused: boolean (true/false) value of the driver pause status.

  • [en] Loftware Driver: specifies boolean (true/false) value of the printer driver status. Provides information if the selected driver is a Loftware driver.

  • [en] Spooler status: specifies the spooler status in a string form – as reported by the Windows system. The spooler can simultaneously report several statuses. In this case, the statuses are merged using comma ",".

  • [en] Spooler status ID: specifies spooler status formatted as a number – as reported by the Windows system. The spooler can simultaneously report several statuses. In this case, the returned status IDs contains all IDs as flags. For example, value 5 represents status IDs 4 and 1, which translates to "Printer is in error, Printer is paused". Refer to the table below.

    提示

    [en] The action returns a decimal value, the values in the table below are in hex format, so you will have to do the conversion before parsing the response.

  • [en] Table of spooler status IDs and matching descriptions

    [en] Spooler status ID (in hex)

    [en] Spooler status description

    0

    [en] No status.

    1

    [en] Printer is paused.

    2

    [en] Printer is printing.

    4

    [en] Printer is in error.

    8

    [en] Printer is not available.

    10

    [en] Printer is out of paper.

    20

    [en] Manual feed required.

    40

    [en] Printer has a problem with paper.

    80

    [en] Printer is offline.

    100

    [en] Active Input/Output state.

    200

    [en] Printer is busy.

    400

    [en] Paper jam.

    800

    [en] Output bin is full.

    2000

    [en] Printer is waiting.

    4000

    [en] Printer is processing.

    10000

    [en] Printer is warming up.

    20000

    [en] Toner/Ink level is low.

    40000

    [en] No toner left in the printer.

    80000

    [en] Current page can not be printed.

    100000

    [en] User intervention is required.

    200000

    [en] Printer is out of memory.

    400000

    [en] Door is open.

    800000

    [en] Unknown error.

    1000000

    [en] Printer is in power save mode.

  • [en] Number of jobs in the spooler: specifies the number of jobs that are in the spooler for the selected printer.

  • Loftware 驱动程序扩展打印机状态: 返回打印机状态并显示 JSON 格式的错误数据。数据还包括打印机参数,比如固件版本、打印头距离和墨水量。

    注意

    需要最新版 Loftware 驱动程序获取 Loftware 驱动程序扩展打印机状态

    例 45. 示例

    NiceLabel Automation返回以下 JSON 内容:

    {
            "printerName":"Production_printer_09",
            "version":"1",
            "responseType":"status3",
            "overallStatus":"error",
            "operationState":"pause",
            "printerType":"Thermal Transfer Label Printer",
            "deviceStatus":
            [
                    {
                            "item": "fatalError",
                            "type": "string",
                            "internalId":"ERR_PAPER_OUT",
                            "shortString":"Paper Out",
                            "longString":"Printer is out of paper."
                    },
                    {
                            "item": "error",
                            "type": "string",
                            "internalId": "ERR_RIBBON_OUT",
                            "shortString": "Ribbon Out",
                            "longString": "Printer is out of Ribbon."
                    }
            ],
            "deviceParameters":
            [
                    {
                            "item":"state",
                            "type":"float",
                            "internalId":"INFO_PRINTHEAD_DISTANCE",
                            "unit": "meter",
                            "value": 789,
                            "shortDescription":"Printhead distance",
                            "longDescription":"Distance of printhead usage."
                    },
                    {
                            "item": "state",
                            "type": "string",
                            "internalId": "INFO_FW",
                            "unit": "",
                            "value": "FW27.3.13",
                            "shortDescription": "Firmware version",
                            "longDescription": "The version of the Firmware loaded on the printer."
                    },
                    {
                            "item": "property",
                            "type": "integer",
                            "internalId": "INFO_PRINT_DISTANCE",
                            "unit": "seconds",
                            "value": 16004,
                            "shortDescription": "Print Distance",
                            "longDescription": "Print Distance that the printer printed since odometer reset."
                    }
            ]
    }

[en] Store Label to Printer

[en] This action saves label template in the printer memory. The action is a vital part of Store/Recall printing mode, using which you first store a label template into the printer's memory and later recall it. The non-changeable parts of label design are already stored in the printer, so you only have to provide the data for variable label objects at print time. For more information, see section Using Store/Recall Printing Mode in NiceLabel Automation user guide.

注意

[en] The required label data transfer time is greatly minimized as there is less information to be sent. This action is commonly used for stand-alone printing scenarios, where the label is stored to the printer or applicator in the production line and later recalled by some software or hardware trigger, such as barcode scanner or photocell.

[en] Advanced options for storing label to printer group allows you select a label and the preferred storing variant.

  • [en] Label name to be used on the printer: specifies the name to be used for storing the label template in printer memory. Enter the name manually or enable Data source to define the name dynamically using an existing or newly created variable.

    警告

    [en] When storing the label to a printer, it is recommended to leave the label name under the advanced options empty. This prevents label name conflicts during the recall label process.

  • [en] Store variant: defines printer memory location for stored label templates. Enter the location manually or enable Data source to define the name dynamically using an existing or newly created variable.

[en] Print PDF Document

Enterprise.png

[en] The Print PDF Document action prints static PDF documents that are not linked to the labels in your PowerForms solutions or NiceLabel Automation configurations. Use this action to print any PDF document directly from your solutions or configurations. The PDF documents can be stored on:

  • 您的计算机

  • NiceLabel Control Center

  • Web 服务器

  • 共享的网络驱动器

提示

如果您计划在包装上加上内含明细的打印 PDF 报告,或者您希望打印包装文档而不打开文件浏览器,此操作将十分有用。

注意

[en] When in use, the Print PDF Document action takes one printer seat from your license quota. Read the NiceLabel licensing document for more information on licensing.

打印机组指定要用于当前打印作业的打印机名称。

  • 打印机名称:从本地安装的打印机驱动程序列表中进行选择,或手动输入打印机名称。选择数据来源以使用变量来动态选择打印机。如果启用,选择或创建一个包含打印机名称(在运行此操作时使用)的变量。

文件组设定重定向文件。

  • 文件名:指定要打印的 PDF。

注意

对于网络资源,请使用 UNC 语法。有关详细信息,请参阅《NiceLabel Automation 用户指南》中的“访问网络共享资源”一节。