Printing
Use the command #print to print your test results automatically
Last updated
Use the command #print to print your test results automatically
Last updated
This command set default printer and send additional variables to a printer
*def{:printer=[string]}{:?<var0>=[string]:...:?<varn>=[string]}
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.
Set default printer and create/change two variables "header" and "footer".
*def:printer="ZDesigner GX430t":?header="Hello!":?footer="Good bye.."
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.
label:sheet=[string]:range=[string]{:printer=[string]}
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
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.
Send a plain text to the specified printer to print.
Usage is the same like Label printing, see for additional arguments only.
text:sheet=[string]:range=[string]{:printer=[string]}{:page-margin=[int]}
page-margin
[int]
Page margins in [mm].
Default: 10 [mm]
Directly print the selected OpenOffice Calc's sheet. This is the same like "Print" functionality in the OpenOffice Calc
Requirements:
It is necessary to define "Print sections" (the Format menu) in the test-file (.ods) - you have to remove them all on all sheets, or define a new on specified sheet to be printed otherwise nothing will happen after printing (no pages will be send to the printer)
sheet:{:printer=[string]}{:format=[enum]}{:orientation=[enum]}
sheet
[string]
Spreadsheet name to print.
format
[enum]
Paper format
Default: A4
orientation
[enum]
Paper orientation: portrait or landscape
Default: portrait
Print the sheet "PRINT" on "PDFCreator" printer using standard A4 format - portrait.
sheet:"PRINT":printer="PDFCreator"