Preview Label
This action executes the print process and provides label image preview. By default, the preview is saved to disk as JPEG image, but you can choose other image format. You can also control the size of the created preview image. The action generates preview for a single label.
Once you have the label preview created in a file, you can send the file to a third party application using one of the outbound actions, such as HTTP Request, Send Data to Serial Port, Send Data to TCP/IP Port, or use it as response message from bidirectional triggers, such as and Web Service Trigger. The third party application can take the image and show is as label preview to the user.
About group identifies the selected action.
- Name: allows you to define a custom action name. This makes actions easily recognizable on the solution's list of actions. By default, the action name is taken from its type.
- Description: custom information about the action. Enter a description to explain the purpose and role of action in a solution.
- Action type: read-only information about the selected action type.
Preview group defines the file to be previewed and its details.
File name: specifies the path and file name. If hard-coded, the same file is used every time. If you only use the file name without path, the folder with configuration file (.MISX) is used. You can use a relative reference to the file name, where folder with .MISX file is used as root folder. Data source option enables variable file name. Select or create a variable that contains the path and/or file name after a trigger is executed. Usually, the value to the variable is assigned by a filter.
Image type: specifies the image type which is used for saving the label preview.
Preview label back side (2-sided labels): enables preview of the back label. This is useful, if you use double-sided labels and want to preview the label's back side.
Example
If your label template defines dimension as 4" × 3" and the label printer resolution is set to 200 DPI, the resulting preview image has dimensions of 800 × 600 pixels. Width equals 4 inches times 200 DPI, which results in 800 pixels. Height equals 3 inches times 200 DPI, which results in 600 pixels.
Additional settings group allows you to enable the use of provisional values.
Use provisional values: replaces missing data source values with provisional values and displays them in the label preview.
Tip
Provisional value defines a custom placeholder variable value in an object while designing labels or forms. In a label object, the provisional value is replaced by the real variable value at print time.
Action Execution and Error Handling
Each action can be set as a conditional action. Conditional actions only run when the defined conditions allow them to be run. To define these conditions, click Show execution and error handling options.
Execution options are:
- Enabled: specifies if the action is enabled or disabled. Only enabled actions will execute. This functionality may be used while testing a form.
- Condition: defines one-line programming expression that must provide a Boolean value (true or false). When the result of the expression is true, the action will execute. Condition offers a way to avoid executing actions every time.
Error handling options are:
- Ignore failure: specifies whether an error should be ignored. If enabled, the execution of actions continues even if the current action fails.
Note
Nested actions that depend on the current action do not execute in case of a failure. The execution of actions continues with the next action on the same level as the current action. The error is logged but does not break the execution of the action.
- Save error to variable: allows you to select or create a variable to save the error to. The same cause of the error is also saved to internal variables ActionLastErrorId and ActionLastErrorDesc.
At the end of printing, you might want to send the status update to an external application using the HTTP Request action. If the printing action fails, action processing stops. In order to execute the reporting even after the failed print action, the Print Label action must have the option Ignore failure enabled.