Printing
Use the command #print to print your test results automatically
#print
This command set default printer and send additional variables to a printer
Command Overview
*def{:printer=[string]}{:?<var0>=[string]:...:?<varn>=[string]}
Parameter Description
printer
[string]
Printer name to be used as default (e.g. "ZDesigner GX430t", the name in the Windows Printers control panel).
var
[string]
Variable(s) to be created/changed. Each variable name must start by '?', otherwise it is not recognized as variable. If variable does not exist, its created, otherwise the value of existing one is changed.
Example
Set default printer and create/change two variables "header" and "footer".
*def:printer="ZDesigner GX430t":?header="Hello!":?footer="Good bye.."
Typical Use Cases for Printing
1. Label Printing

Send an unformatted data to the specified printer (RAW printing). This allows typically to control label-printers by sending printer's command directly.
Source data can be directly in test-file or in an external text-file. This depends on which of "sheet" or "file" argument of "label" command is used:
• sheet used: range argument is required, data are in the specified sheet and range
• file used: data are in specified external text-file Variables (standard and test-file) are applied to final data before sending to the printer.
Variables (standard and test-file) are applied to final data before sending to the printer.
Command Overview
label:sheet=[string]:range=[string]{:printer=[string]}
Parameter Description
sheet
[string]
Sheet name with print data
range
[string]
Range of specified sheet to obtain source data.
Format: "<cell-from>:<cell-to>" (i.e. "A1:B10") • one column only: all rows are merged to final printer's data (using "\n" separator, skipping empty rows)
• more than one colum:
- first column is used like a row-filter:
"1" means data-row is always taken, empty means data-row is taken if non-empty, otherwise ignored
- following columns are data: merged without any
separator from all cells of the row
printer
[string]
Optionally set a printer name. Required if no default printer set.
Default: printer set by *def
Example
Following examples uses print commands of Zebra label printers.
Let's assume we have a sheet: "PRINT" with the following content

label:sheet="PRINT":range="A1:A10"
Result: Print a simple one-text-only label using printer's data from sheet "PRINT", range A1 to A10 (one column, 10 cells in total) to the printer. Rows 7 to 10 are ignored, because they are empty. Rows 1 to 6 are merged into one string using LF ("\n") separator.
2. Print Simple Text
Send a plain text to the specified printer to print.
Usage is the same like Label printing, see for additional arguments only.
Command Overview
text:sheet=[string]:range=[string]{:printer=[string]}{:page-margin=[int]}
Additional Parameters (on top of ones included in label printing section)
page-margin
[int]
Page margins in [mm].
Default: 10 [mm]
3. Print Spreadsheet
Directly print the selected OpenOffice Calc's sheet. This is the same like "Print" functionality in the OpenOffice Calc
Command Overview
sheet:{:printer=[string]}{:format=[enum]}{:orientation=[enum]}
Additional Parameter (on top of ones included in label printing section)
sheet
[string]
Spreadsheet name to print.
format
[enum]
Paper format
Default: A4
orientation
[enum]
Paper orientation: portrait or landscape
Default: portrait
Example
Print the sheet "PRINT" on "PDFCreator" printer using standard A4 format - portrait.
sheet:"PRINT":printer="PDFCreator"
Last updated
Was this helpful?