TFPrint Parameters

Use the parameters below to select a form layout, provide its data and choose the output. Parameter names and the type values of -DT and -OT are case-insensitive. Data-source, project, form, field and printer names are passed as supplied; use the names and filename spelling required by the selected source or operating system.

See Syntax and required parameters for complete commands and Quoting and parameter order before combining options. The descriptions of direct input and output below apply to commands without -DT TFS; TFS job files have their own job and output settings.

Parameter Index

Parameter Purpose Section
-C <file> Read additional parameters from an ASCII command file. Other Options, Command Files
-CONFIG <file> Select a TFORMer.xml configuration file. Other Options
-D <source> Data file or data-source name. Data Input
-DO CL..., ESC... Clear fields between records; escape-sequence handling. Data Options
-DO RCF<name>, RCA<name> Field or attribute with the record copy count. Data Options
-DO XSLT:<file> XSLT transformation of XML input. Data Options
-DO SC<c>, QC<c> Column separator and text qualifier for text input. Text Separators and Qualifiers
-DO DSN:, USER:, PWD:, SQL: Direct ODBC query. Direct ODBC Input
-DO <name>:<value> Parameters of a configured data source. Configured Data-Source Parameters
-DT <type> Data format: XML, TEXT, TFORMER, TFS, ODBC or DATASOURCE. Data Input
-F <layout> Stand-alone form file, or repository, project and form. Form Layout
-H, -?, -HELP, --help Show the built-in help and exit. Other Options
-L <license> License data: seven fields, b64: or file:. License Options
-LCUPS List CUPS printers and exit (Linux). Other Options
-O <target> Printer name, repository device or output filename. Output Target
-OO CP, TC, SR, SC, DX, JT Copies, tray control, start position, duplex, job title. Output Options
-OT <type> Output type: printer, file format or repository device. Output Target
-Q Quiet mode. Other Options
-SDK "<options>" SDK print options as one argument. SDK Options
-SYSTEMID Print the System ID and exit. Other Options

Form Layout

-F selects the form layout. It is required for a direct job. A TFS job file can supply stand-alone form filenames instead, so -F is optional in that mode.

Stand-Alone Form

-F "C:\Forms\MyForm.tff"

Supply one argument: the filename of a stand-alone form layout (.tff). The simplest complete command prints such a layout with its configured data to the operating system's default printer:

tfprint -F "C:\Forms\MyForm.tff"

Repository Form

-F "C:\Repositories\MyRepository.tfr" MyProject MyForm

Supply three arguments in this order:

  • Repository: filename of the TFORMer repository (.tfr).
  • Project: name of the project in that repository.
  • Form: name of the form layout in that project.

Quote filenames and names containing spaces. For remote input, follow File paths and URLs; use local files when remote access is not available in the installed package.

Data Input

-D <source>
Selects an input filename, or the name of a configured data source when used with -DT DATASOURCE. A repository file (.tfr) belongs to -F, not to -D.
-DT <type>
Selects how TFPrint reads the source. When -D is supplied, also supply -DT.
Type Source and requirements
XML Import an XML data file supplied with -D; see XML Files.
TEXT Import a delimited text or CSV file supplied with -D; -DO SC<character> is required. See Text Files.
TFORMER Read data in the internal TFORMer XML format. Supply the intended file with -D.
TFS Read a TFS job file supplied with -D. A file can contain several jobs and outputs. TFSSCRIPT is an alias.
ODBC Query an ODBC source directly; -D is not required. Supply DSN: and SQL: through -DO.
DATASOURCE Select a data source defined in the layout by its name with -D; supply its parameters through -DO.

For example, this command imports an XML data file and creates a PDF:

tfprint -F "MyLayout.tff" -D "data.xml" -DT XML -OT PDF -O "output.pdf"

Without -D and -DT, TFPrint leaves the layout's configured data selection in place. The layout and its data-source configuration determine which data is read. To read a particular external file, select that file explicitly with -D and -DT; omitting -D does not select a neighboring .xml file in every mode.

Supply CSV/TXT input as a local file. For remote XML input and its local-file alternative, see File paths and URLs. For the shared ZIP and Base64 input rules, see Providing Job Data.

Data Options

-DO <options>
Accepts separate, space-delimited arguments. Place -DT before -DO. In DATASOURCE mode, these arguments are data-source parameter names and values; in other modes they are the import options in the following table.
Option Meaning Applies to -DT
CL, CLyes, CLy, CL1 Clear data fields between records. This is the default for direct input. XML, TEXT, ODBC
CLno, CLn, CL0 Reuse the preceding record's values for fields not supplied by the new record. See Data Field and Escape Handling. XML, TEXT, ODBC
ESC, ESCyes, ESCy, ESC1 Enable escape-sequence handling, for example translating \n into a newline. See Escape Sequences in Data Field Values for the supported sequences. XML, TEXT, ODBC
ESCno, ESCn, ESC0 Disable escape-sequence handling; this is the default. XML, TEXT, ODBC
RCF<name> Field containing the number of copies for each record; for example, RCFQuantity reads the Quantity field. XML, TEXT, ODBC
RCA<name> XML attribute containing the number of copies for each record, for example RCACopies. For text and ODBC input, use RCF. XML
XSLT:<file> Apply an XSLT transformation to the XML input before importing its result. XML
SC<character> Column separator; required for text input. See Text Separators and Qualifiers. TEXT
QC<character> Text qualifier; without QC, no qualifier is used. TEXT
DSN:<connection-string> ODBC connection string; required. See Direct ODBC Input. ODBC
USER:<user> User name, when required by the connection. ODBC
PWD:<password> Password, when required by the connection. ODBC
SQL:<statement> SQL query; required. ODBC
<parameter-name>:<value> Value of a data-source parameter. See Configured Data-Source Parameters. DATASOURCE

The CL and ESC keywords and their suffixes are case-insensitive. A bare keyword enables the option; suffixes other than yes, y, 1, no, n or 0 are invalid. Do not rely on ESC for -DT TFORMER or -DT TFS input; see TFS compatibility.

The record count selected with RCF or RCA is separate from the job copy count selected with -OO CP<n>. The default interpretation is a field, not an XML attribute. See Copies per Record for the data representation and configured-source rules.

Supply the XSLT filename as part of the XSLT: argument and quote the argument if it contains spaces. For example, this command transforms data.xml with data.xsl before importing the result:

tfprint -F "MyLayout.tff" -D "data.xml" -DT XML -DO XSLT:data.xsl -OT PDF -O "output.pdf"

Text Separators and Qualifiers

The separator or qualifier character immediately follows SC or QC. There is no default separator; omitting SC for text input is an error. Use one literal character or an escape spelling. If a literal value contains several characters, only its first character is used.

Argument Character
SC; Semicolon separator.
SC, Comma separator.
SC\t Tab separator.
SC\x20 Space separator.
SC\xNN or QC\xNN Character identified by up to two hexadecimal digits.
SC\0NNN or QC\0NNN Character identified by up to three octal digits after the initial 0.
SC\DDD or QC\DDD Character identified by up to three decimal digits, beginning with 1 to 9.
QC\x22 Double-quote qualifier.
QC\x27 Single-quote qualifier.

The character escapes also include \a (alert), \b (backspace), \f (form feed), \n (line feed), \r (carriage return), \t (tab) and \v (vertical tab). Only these escapes are translated: a backslash followed by another letter yields that letter, and a single trailing backslash yields the backslash itself. The text-file format determines which characters are suitable separators and qualifiers; see Valid Column Separators and Valid Text Qualifiers.

For example, these arguments select semicolon-separated input with a double-quote qualifier:

-DT TEXT -DO SC; QC\x22

These are TFPrint argument spellings, not shell string literals. Pass each argument intact. A shell may treat a semicolon, backslash or quote specially; see Quoting and parameter order. The hexadecimal qualifier spelling avoids embedding a literal quotation mark in an ASCII command file.

SC under -DO selects a separator character. SC under -OO selects a start column and takes a number.

Direct ODBC Input

-DT ODBC -DO DSN:DSN=TFORMer_Sample SQL:"SELECT * FROM tbl_Example"

No -D is needed for this form. Quote a statement containing spaces. Returned column names must match the layout's data fields; see Providing Job Data. Keep connection credentials confidential when using scripts or command files.

Configured Data-Source Parameters

-D MyDataSource -DT DATASOURCE -DO CustomerId:1001 "Region:North America"

Each argument has the form <parameter-name>:<value>. The first colon separates the name from the value. A name without a colon supplies an empty value. Parameters such as CL and ESC in this mode are parameter names, not the direct-import options above. For data-source configuration and per-record settings, see Providing Job Data.

Output Target

-O <target>
Supplies a printer name, repository device name or output filename, according to -OT.
-OT <type>
Selects an output type from the following table. Type names are case-insensitive. File output requires -O with an output filename.
Type Output Platform
WIN32 Windows printer selected by -O, or the Windows default printer if -O is omitted. Windows
CUPS CUPS printer; specify its configured queue name with -O. Linux
REPO Device configured in the loaded repository; -O selects its name, or omit -O to select that repository's default device. Windows, Linux
PS PostScript file. Windows, Linux
PSPRINTER Direct PostScript printer output. Windows, Linux
PDF PDF file. Windows, Linux
PDFA PDF/A file. Windows, Linux
HTML HTML index file; the individual pages are written to a directory named after the output file with the suffix _pages beside it, for example output_pages for output.html. Deploy both. Windows, Linux
TXT Text file. Windows, Linux
TXTPRINTER Direct text printer output. Windows, Linux
IMGBMP BMP image file per page. Windows, Linux
IMGGIF GIF image file per page. Windows, Linux
IMGJPG JPEG image file per page. Windows, Linux
IMGPCX PCX image file per page. Windows, Linux
IMGPNG PNG image file per page. Windows, Linux
IMGTGA TGA image file per page. Windows, Linux
IMGTIF TIFF image file per page. Windows, Linux
IMGMULTITIF Multi-page TIFF file. Windows, Linux
ZPL ZPL-II file for Zebra printers. Windows, Linux
ZPLPRINTER Direct ZPL-II printer output through the named Windows printer. Windows
ZUGFERD ZUGFeRD PDF file. Windows, Linux
SVG SVG file. Windows, Linux
SVGZ Gzip-compressed SVG file. Windows, Linux

For the single-page image types, include # characters in the filename to insert the page number, for example -O "page###.png" -OT IMGPNG. IMGMULTITIF stores all pages in one file:

tfprint -F "Demos.tfr" TFORMer_Runtime_Examples BarcodeLabels -OT IMGMULTITIF -O "output.tif"

For additional filename controls, see eval-file-name-per-page.

To print on a named printer, select the platform's printer type and name the printer or queue with -O:

tfprint -F "MyLayout.tff" -OT WIN32 -O "HP LaserJet 4050"
tfprint -F "MyLayout.tff" -OT CUPS -O HP_LaserJet_4200

The first command addresses a Windows printer, the second a CUPS queue on Linux; tfprint -LCUPS lists the available queues. The TFPrint guide shows the installed printer samples for both platforms.

Without -OT, TFPrint uses the operating system's default printer type. With no -O either, it selects the default Windows printer or the CUPS default queue on Linux. This differs from -OT REPO, which selects the repository's output configuration. -OT REPO is intended for repository forms; for stand-alone layouts, select an explicit output type or printer.

On Linux, omit both -OT and -O to use the CUPS default queue. For explicit -OT CUPS, supply -O with a configured queue name; an empty queue name is rejected. The executing account needs access to the selected printer and CUPS needs a configured default queue for default printing.

In TFS mode, output destinations come from the job file; leave -O and -OT out of a TFS command. See TFS compatibility.

Output Options

-OO <options> accepts separate, space-delimited output-option arguments. The option keywords are case-insensitive; attached names and titles retain their supplied spelling.

Option Meaning Default for direct output
CP<n> Number of copies of the complete job; for example CP2 requests two copies. 1
TC<name> Name of the repository's JobTrayControl settings. none (layout and configuration settings apply)
SR<n> Zero-based start row for the first label sheet. Rows before it remain unused on that first sheet. 0
SC<n> Zero-based start column for the first label sheet. Columns before it remain unused on that first sheet. 0
DXN No duplex printing. none (layout and configuration settings apply)
DXH Horizontal duplex printing. As above.
DXV Vertical duplex printing. As above.
JT<title> Job title, used as the spool-job name on Windows. none
-OO CP2 SR0 SC1 "JTDaily labels"

Use positive decimal integers for CP: a value of 0 or below, or a non-numeric value, causes error 13 (ERROR_INVALID_DATA). Use non-negative decimal integers for SR and SC; these values are passed on without a check. Start positions are useful for partly used label sheets. There is no dedicated page-range parameter in this option group.

TFPrint has no argument for a native Windows DEVMODE or a CUPS options string; use the command-line options and the SDK print options.

For page order with multiple copies, see Copy Order. The Copies and Duplex reference lists the settings and output-type restrictions.

Specify a copy or duplex setting through one option group rather than combining -OO CP... with -SDK "copies=...", or -OO DX... with -SDK "duplex=...". This avoids relying on the precedence of competing settings. The same applies to copy counts in a TFS job file.

In TFS mode, CP, SR, SC and JT are not applied; see TFS compatibility.

SDK Options

-SDK <option-string> passes one argument containing SDK print options. Quote the entire string when it contains spaces; further unquoted arguments replace the previously supplied string.

-SDK "media=A4 noDuplex offsetX=2mm offsetY=-3mm"

For image output, for example, use -SDK "resolution=300". A paper and duplex option string can be supplied as -SDK "media=A4 duplex=vertical" when the selected output supports those settings.

The string contains name=value pairs separated by spaces. A Boolean option's bare name means true; prefixing its name with no means false. Boolean values include Yes, True, 1, No, False and 0 as listed with the option. Additional escaping may be needed to retain quotes inside an option value; see Set Options for a Job and the shared Option String Syntax.

Print options adjust the selected job's output settings and take precedence over the defaults of the layout, the repository and TFORMer.xml. Use the shared reference for the permitted values, defaults and output-type restrictions:

See Output Options for the complete reference, including options for PDF, ZUGFeRD, ZPL and other output types. For shared configuration defaults, see Configuration. For TFPrint-specific copy and duplex combinations, follow Output Options above.

License Options

Use -L to supply TEC-IT-issued license data for the invocation. It can be omitted when automatic license lookup provides a suitable license. TFPrint initializes the runtime, then applies explicit -L data; see License Files and Registry and the automatic lookup order for Windows or Linux.

License File

-L "file:TFORMer.ini"

Supply the path to the license file, which is provided with the license or can be requested from TEC-IT Support. This explicit form also accepts a file outside the automatic search locations; the automatic filename is TFORMer.ini.

For example, combine a license file with PDF output:

tfprint -F "MyLayout.tff" -O "output.pdf" -OT PDF -L "file:TFORMer.ini"

Replace the layout, output and license-file paths with your own files. This example retains the layout's configured data; add the data parameters above for external input.

Base64 License Data

-L "b64:BASE64_LICENSE_DATA_FROM_TEC_IT"

Supply the Base64 license data received from TEC-IT as one argument. The file: and b64: prefixes are case-insensitive.

Individual License Fields

-L <activation-code> <licensee> <kind> <count> <options> <expiry> <signature>

Supply all seven fields in this order. The placeholders are not license data and the syntax line is not a command to run verbatim.

Position Field Value
1 Activation code Issued activation code.
2 Licensee Issued licensee name; quote it if it contains spaces.
3 License kind Issued kind from the table below, or its corresponding numeric value.
4 Number of licenses Issued license count.
5 License options Issued options; may be empty.
6 Expiration date Issued expiration date; may be empty.
7 Signature Issued signature.
Kind Numeric value
Workstation 1
Site 2
Developer 3
Office 4
Workgroup 5
Server 6

Kind names are case-insensitive. A supplied numeric kind must identify one of these six kinds. The built-in help lists the single-workstation kind as Single; TFPrint accepts only Workstation or 1 for it. Supply the seven values exactly as issued. A count of 0 is treated as 1 when the license is applied; use the issued count.

Preserve empty options and expiry fields as separate arguments: pass an empty argument ("") or a quoted single space (" "), because surrounding whitespace is trimmed. Missing licensee or signature with a supplied activation code is an error.

Keep license data confidential: command-line arguments and scripts may be visible to other users or recorded in logs. See Licensing for permitted use, redistribution and License Validity and SDK Updates. Use the issued license with the exact runtime build you intend to deploy.

Other Options

Parameter Meaning
-Q Suppress TFPrint's regular progress messages and usage text after the argument is read; quiet mode is off by default. Errors remain on standard error. It does not suppress the output of -LCUPS or -SYSTEMID.
-C <file> Read extra arguments from a plain ASCII command file, in addition to the command line. Unicode command files are not supported; see Command files.
-LCUPS List available CUPS printers and exit; available for Linux, unsupported on Windows.
-SYSTEMID Print the System ID used for licensing and exit.
-CONFIG <file> Select a TFORMer.xml configuration file after runtime initialization and before explicit license application; see Selecting a Configuration File.
-H, -?, -HELP, --help Show detailed built-in help and exit. Parameter names are case-insensitive, so -h also works. On Linux, quote -? ('-?') or use -H, because an unquoted ? can be expanded by the shell. See Command-Line Help.

For example, this repository-form command uses the settings in settings.xml instead of the default TFORMer.xml:

tfprint -F "Demos.tfr" TFORMer_Runtime_Examples BarcodeLabels -OT PDF -O "BarcodeLabels.pdf" -CONFIG "settings.xml"

Arguments are processed in order. Help, printer listing and System ID commands exit immediately; an argument after one of them is not applied. Place -Q before the output it should suppress:

tfprint -Q -H
tfprint -H -Q

The first form suppresses the help text; the second displays it and exits before reading -Q. Both are help invocations, not output operations. Check the exit status and diagnostic output in scripts.

Search documentation

Search in
More scopes
Additional scopes

All contents