TFPrint Syntax
Invocation Forms
Use one of these invocation forms:
tfprint -F FormLayoutFile [DataParameters] [OutputParameters] [OtherParameters]
tfprint -F Repository Project FormLayout [DataParameters] [OutputParameters] [OtherParameters]
tfprint -D TFSJobFile -DT TFS [OtherParameters]
tfprint -F Repository -D TFSJobFile -DT TFS [OtherParameters]
The placeholders denote these parameter groups:
DataParameters:
-D DataFileOrDataSourceName
-DT XML|TEXT|TFORMER|TFS|ODBC|DATASOURCE
-DO DataOption ...
OutputParameters:
-O DeviceOrFile
-OT OutputType
-OO OutputOption ...
OtherParameters:
-SDK "Options"
-L ActivationCode LicenseeName LicenseKind NumberOfLicenses LicenseOptions ExpirationDate Signature
-L b64:Base64LicenseData
-L file:LicenseFile
-Q
-C CommandFileASCII
-CONFIG ConfigurationFile
Square brackets mean optional groups, subject to the conditions below. A vertical bar separates alternatives; it is not a shell pipe. Placeholder names and the group labels are not arguments to pass literally. The three -L lines are alternatives.
The information commands are tfprint -H, tfprint -?, tfprint -HELP, tfprint --help, tfprint -SYSTEMID and, on Linux, tfprint -LCUPS. These commands terminate after handling the request. On Linux, quote -? ('-?') or use -H, because an unquoted ? can be expanded by the shell. See Command-Line Help, Other Options and Exit Codes.
Required Parameters
Direct Invocation
- Supply
-Fwith a stand-alone form layout, or with a repository, project and form name. - When supplying a data file with
-D, also select its format with-DT. - For
-DT TEXT, supply the column separator with-DO SCc. - For
-DT ODBC, supply a non-empty connection string withDSN:and a query withSQL:under-DO;-Dis not required. - For a configured DataSource, select
-DT DATASOURCEand pass its name with-D. - File output types require a destination filename with
-O; printer outputs use the appropriate printer-selection rules.
Layout, data and output are not three universally required parameter groups. To use the data already configured in the layout, omit -D and -DT. To read a specific external file, select it with -D and -DT; -DT TFORMER without -D is not equivalent to omitting the data group.
See Data Input, Output Target and the shared data chapter.
TFS Invocation
Use -DT TFS together with a non-empty -D job-file path. When -F is omitted, the job selects stand-alone layouts. When -F supplies a repository, the job's Form elements select its project and forms.
The job file supplies each output's destination; leave -O and -OT out of a TFS command. See TFPrint Compatibility for the treatment of command-line output parameters in this mode.
Quoting and Order
Start switches with an ASCII minus sign (-), not a typographic dash or a slash. Switch names are case-insensitive. The values of -DT, -OT and the license kind are also compared without regard to case; preserve the intended spelling of filenames, DataSource parameters and other names. Every argument beginning with - is treated as a switch, so argument values such as filenames or SDK strings must not begin with -.
Quote any argument containing spaces. The shell processes quotes before TFPrint receives the arguments; shell quoting and the parser used by -C are different. Pass the entire SDK option string as one argument:
tfprint -F "MyLayout.tff" -OT PDF -O "output.pdf" -SDK "resolution=300 locale=en-us"
Do not split the SDK string into separate unquoted arguments. For -DO and -OO, place their individual option tokens after the corresponding switch; protect spaces within a token, such as a SQL statement, using the quoting rules of your shell.
Arguments are read in order. Supply the data type before its type-specific options, and keep every option token under its intended switch. Information commands exit before later arguments are read, and -Q affects only the output after it is read; see Other Options.
Repeated scalar settings can replace earlier settings. Specify copies and duplex through one option group only; see Output Options.
Command Files
-C reads additional command-line parameters from a plain ASCII file. It is not an XML input format, and it is separate from a TFS job file.
For example, the contents of text-params.txt can be:
-DT TEXT
-DO SC; 'QC"'
The single quotes protect the double quote that is used as the text qualifier. This example is command-file content, not a shell command.
Use it with the layout and data path supplied on the command line:
tfprint -F "MyLayout.tff" -D "input.csv" -C "text-params.txt" -OT PDF -O "output.pdf"
The command-file parser separates tokens at spaces (not tabs) outside quoted text. Single or double quotes delimit quoted text and are removed; the other quote character inside such a token is retained. A line break ends the token and resets the quoting state, so keep each quoted argument on one line.
A command file is parsed immediately at the -C argument. Its end-of-file checks can run before later command-line arguments are processed. Put the required layout and input settings before -C, or include them in the file. Direct arguments following the file can then supply additional settings or replace scalar values; begin them with a switch, because a value without a switch is assigned to the last switch read from the file.
Relative paths in the command file use the process working directory, not the directory containing the command file. Save the file as ASCII rather than a Unicode document.
File Paths and URLs
Relative command-line layout/repository and data paths are resolved against the current working directory. For file-output types, a relative destination filename is resolved in the same way. Use absolute paths when an application, service or batch does not control that directory.
Path arguments beginning with BASE64: are left unchanged by this relative-path conversion. This handling is separate from the -L b64: license form.
Supply CSV/TXT input as a local file. Direct layout or XML URL access depends on the input type, protocol, platform and installed package; support for one combination does not extend to another. Use local layout and data files when direct access is unavailable. When downloading a repository, preserve its associated files and directory structure.
See Direct URL Access and the TFPrint workflow for the documented combinations. The parameter reference distinguishes the data formats and their conditions.