FunTest Documentation
  • What is FunTest?
  • Product Tour
    • Navigation
    • Create your first project
    • Connecting Test Equipment
    • Creating Test Sequence
    • Executing Test Sequence
    • Test Reporting
  • Creating Test Sequence
    • Test File Overview
      • TEST Sequence Tab
    • FunTest Commands
      • Operator Interface
      • Sequence Flow
      • Digital I/O
      • Test Result Export
      • Printing
      • Other Commands
    • Calling Device Plugin
    • Test Point Control
    • Using Spreadsheet Formulas
    • Variables
    • Interrupt Events
    • Online Debugging
  • FunTEST Plugins
    • Plugin Overview
  • Test Station
    • Test Station Setting
  • Other
    • Run FunTEST Externally
  • How To's
    • How To's
Powered by GitBook
On this page
  • #print
  • Command Overview
  • Example
  • Typical Use Cases for Printing
  • 1. Label Printing
  • Command Overview
  • Example
  • 2. Print Simple Text
  • Command Overview
  • 3. Print Spreadsheet
  • Command Overview
  • Example

Was this helpful?

  1. Creating Test Sequence
  2. FunTest Commands

Printing

Use the command #print to print your test results automatically

PreviousTest Result ExportNextOther Commands

Last updated 1 year ago

Was this helpful?

#print

This command set default printer and send additional variables to a printer

Command Overview

Command
Parameter
#print

*def{:printer=[string]}{:?<var0>=[string]:...:?<varn>=[string]}

Parameter Description

Parameter
Type
Options

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".

Command
Parameter

#print

*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

Command
Parameter
#print

label:sheet=[string]:range=[string]{:printer=[string]}

Parameter Description

Parameter
Type
Options

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

Command
Parameter

#print

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

Command
Parameter
#print

text:sheet=[string]:range=[string]{:printer=[string]}{:page-margin=[int]}

Additional Parameters (on top of ones included in label printing section)

Parameter
Type
Options

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

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)

Command Overview

Command
Parameter
#print

sheet:{:printer=[string]}{:format=[enum]}{:orientation=[enum]}

Additional Parameter (on top of ones included in label printing section)

Parameter
Type
Options

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.

Command
Parameter

#print

sheet:"PRINT":printer="PDFCreator"

ZPL (Zebra Programming Language)
Page cover image