Redirect Printing to PDF
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.
Print stream data can be appended to an existing file, or it may overwrite it.
The action instructs Loftware to redirect printing – as a result, the labels are not printed. Make sure the action is followed by the Print Label action.
Note
Loftware 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 Loftware Automation user guide.
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.
File group defines the redirect file.
-
File name: specifies the file name for diverting the print job to. If hard-coded, the printing is redirected to the specified file every time. To define it dynamically, use an existing or create a new variable.
-
Overwrite the file: if the specified file already exists on the disk, it is going to be overwritten (selected by default).
-
Append data to the file: the job file is appended to the existing data in the provided file (deselected by default).
-
Embed fonts in PDF: If you use some non-standard font, your solution might produce different PDF output on computers without this font. With Embed fonts in PDF option enabled, you embed your non-standard font into your solution and your solution creates the same PDF on all computers.
Embed fonts in PDF option creates PDF for Archiving (PDF/A) compliant document. The PDF/A standard ensures your documents are reproduced exactly the same way, regardless of what software you use. The information required for displaying the contents like images, fonts, and color information is embedded in your PDF file.
Note
The output PDF file consumes more space when saved with this option enabled.
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.
-
Apply to next print action: specifies for the print redirect to be applicable to the next Print Label action only (single event).
-
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.
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.