This action returns structural information about the associated label file. It provides information about the label dimensions, printer driver and lists all label variables, and their main properties.
The Get Label Information action returns the original information as saved in the label file. Additionally, it also provides information after the print process has been simulated. The simulation ensures that all labels variables get the value as they would have during a normal print. Also, the label height information provides correct dimensions in case you define the label as a variable-height label (in this case, the label size depends on the amount of data to be printed). The action returns the dimensions for a label size, not for a page size.
The action saves label structure information in a selected variable. You can then send the data back to the system using the HTTP Request action (or a similar outbound data connectivity action), or send it back in trigger response, if you use a bidirectional trigger.
Note | |
---|---|
This action must be nested under the Open Label action. |
Variable group selects or creates a variable that stores the structural information about a label.
-
Name: specifies the variable name. Select or create a variable which stores the XML-formatted label information.
-
If you want to use the information from the XML inside this trigger, you can define the and execute it with Use Data Filter action (Automation Builder only).
-
If you want to return the XML data as a response in your HTTP or Web Service trigger, use this variable directly in the Response data field of the trigger configuration page.
-
If you want to save the XML data to a file, use the Save Data to File action.
-
Additional settings group allows you to enable the use of provisional values.
-
Use provisional values: replaces missing data source values with provisional values.
Tip | |
---|---|
See section Variable in Loftware Designer user guide for detailed description of provisional values. |
Sample Label Information XML
The sample below presents a structural view of the label elements and their attributes as they are returned.
<?xml version="1.0" encoding="UTF-8"?><Label> <Original> <Width>25000</Width> <Height>179670</Height> <PrinterName>QLS 3001 Xe</Printer> </Original> <Current> <Width>25000</Width> <Height>15120</Height> <PrinterName>QLS 3001 Xe</Printer> </Current> <Variables> <Variable> <Name>barcode</Name> <Description></Description> <DefaultValue></DefaultValue> <Format>All</Format> <CurrentValue></CurrentValue> <IncrementType>None</IncrementType> <IncrementStep>0</IncrementStep> <IncrementCount>0</IncrementCount> <Length>100</Length> </Variable> </Variables></Format>
Label Information XML Specification
This section contains a description of the XML file structure as returned by the Get Label Information action.
Note | |
---|---|
All measurement values are expressed in the 1/1000 mm units. For example width of 25000 is 25 mm. |
-
<Label>: this is a root element.
-
<Original>: specifies label dimensions and printer name as stored in the label file.
-
Width: this element contains the original label width.
-
Height: this element contains the original label height.
-
PrinterName: this element contains the printer name for which the label has been created for.
-
-
Current: specifies label dimensions and printer name after the simulated print has been completed.
-
Width: this element contains the actual label width.
-
Height: this element contains the actual label height. If a label is defined as a variable-height label, it can increase along with label objects. For example, Text Box and RTF object sizes may increase in vertical direction and cause the label to expand as well.
-
PrinterName: this element contains printer name that will be used for printing.
Example 78. Example
A printer different from the original one is going to be used if the original printer driver is not installed on this computer, or if the printer has been changed using the Set Printer action.
-
-
<Variables> and <Variable>: the element
Variables
contains a list of all prompt label variables, each defined in a separateVariable
element. The prompt variables are the ones listed in the print dialog box when you print label from Loftware . If there are no prompt variables defined in the label, the elementVariables
is empty.-
Name: contains variable name.
-
Description: contains variable description.
-
DefaultValue: contains default value as defined for the variable during the label design process.
-
Format: contains the acceptable type of variable content (characters).
-
IsPrompted: contains information whether or not the variable is prompted at print time or not.
-
PromptText: contains text that prompts the user for value input.
-
CurrentValue: contains the actual value that is used for printing.
-
IncrementType: contains information, if the variable is defined as a counter or not. If identified as a counter, it tells what kind of counter it is.
-
IncrementStep: contains information about the counter step. Counter value increments/decrements for this value on the next label.
-
IncrementCount: contains information about the point of counter value incrementing/decrementing. Usually, the counter changes value on every label, but that can be changed.
-
Length: contains maximum number of stored characters in a variable.
-
IsPickListEnabled: contains information whether or not the user selects variable values from a pick list.
-
iPickListValues: contains the actual (selectable) pick list values.
-
XML Schema Definition (XSD) for Label Specification XML
<?xml version="1.0" encoding="utf-8"?><xs:schema id="Format" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name="Label"> <xs:complexType> <xs:all> <xs:element name="Original"> <xs:complexType> <xs:sequence> <xs:element name="Width" type="xs:decimal" minOccurs="1" /> <xs:element name="Height" type="xs:decimal" minOccurs="1" /> <xs:element name="PrinterName" type="xs:string" minOccurs="1" /> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="Current"> <xs:complexType> <xs:sequence> <xs:element name="Width" type="xs:decimal" minOccurs="1" /> <xs:element name="Height" type="xs:decimal" minOccurs="1" /> <xs:element name="PrinterName" type="xs:string" minOccurs="1" /> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="Variables"> <xs:complexType> <xs:sequence> <xs:element name="Variable" minOccurs="0" maxOccurs="unbounded"> <xs:complexType> <xs:sequence> <xs:element name="Name" type="xs:string" minOccurs="1" /> <xs:element name="Description" type="xs:string" minOccurs="1" /> <xs:element name="DefaultValue" type="xs:string" minOccurs="1" /> <xs:element name="Format" type="xs:string" minOccurs="1" /> <xs:element name="CurrentValue" type="xs:string" minOccurs="1" /> <xs:element name="IncrementType" type="xs:string" minOccurs="1" /> <xs:element name="IncrementStep" type="xs:integer" minOccurs="1" /> <xs:element name="IncrementCount" type="xs:integer" minOccurs="1" /> <xs:element name="Length" type="xs:string" minOccurs="1" /> </xs:sequence> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> </xs:all> </xs:complexType> </xs:element></xs:schema>