TFPrint Command-Line Application
Introduction
The TFORMer SDK command-line application, tfprint (tfprint.exe on Windows), is available for Microsoft Windows and Linux. It generates output from arbitrary form layouts created with TFORMer Designer and can be run:
-
directly from a command prompt or terminal;
-
from a batch or shell script;
-
as a separate process launched by an application; or
-
as an extension for printer-filter applications on Linux.
On Windows, choose the executable matching the ODBC driver and runtime architecture required by your application; see TFPrint executable names.
Basic Workflow
Use this basic workflow:
-
Create or select a form layout authored with TFORMer Designer.
-
When external data is required, use an imported data file, a configured DataSource, or direct ODBC input.
-
Select the output target, or retain the output configured in the layout.
-
Run TFPrint directly, from a batch or shell script, or as a separate process launched by an application.
Supply a form layout by filename. File-based XML or delimited text (CSV/TXT) input can also be supplied by filename.
For complete commands that create a first PDF, see the Windows example or Linux examples.
Layout URLs on Windows: -F can load a stand-alone form layout (.tff) from an HTTPS URL. The maintained sample combines that layout URL with a local XML data file.
Remote data: XML data can be imported from an HTTP URL on Windows and Linux. Supply CSV/TXT data as a local file.
See Direct URL access for general availability and the local-file fallback.
For the full syntax listing, see Command-Line Help, including the Linux output types.
Use CUPS for direct Linux printing; WIN32 and ZPLPRINTER are Windows-only. See Output Target for supported types and destination rules.
Command Groups
-
Form:
-F(required for direct jobs; not required for TFS jobs) -
Data:
-D,-DT, and-DO(conditional; use them for an imported data file, a configured DataSource, or direct ODBC input) -
Output:
-O,-OT, and-OO(as required for the selected output) -
SDK print options:
-SDK, for example-SDK "resolution=300"with image output. See Output Options.
Run tfprint -H for the complete installed command syntax.
Import CSV or XML Data
Print with a CSV data file:
tfprint -F "C:\sample.tff" -D "C:\Form Data\data.csv" -DT TEXT -DO SC;
Specify the column separator used by your text file. See the CSV PDF example for comma-separated data with a quotation-mark text qualifier, and the Product Label Quick Start for XML input. Imported field names must match the layout; see Working with Data.
Use a Configured Data Source
The installed PickingListPDF sample uses a data source configured in the layout. Select its name with -D and -DT DATASOURCE; pass its named parameters with -DO. See Configured data source parameters and Working with Data.
Create a PDF from ODBC Data
Direct ODBC input uses -DT ODBC, with the DSN and SQL statement supplied through -DO. The ODBC examples retain the Linux MySQL/unixODBC setup and distinguish it from the Windows ODBCReportPDF sample, which also uses direct ODBC input.
Run TFS Jobs
Use -D to select a TFS job file and -DT TFS to select TFS input. For example, on Windows:
tfprint -D "C:\Jobs\shipping-job.xml" -DT TFS
The job file specifies layouts, records and output destinations. See TFS Job Files for the structure, examples and TFPrint compatibility restrictions.
Call TFPrint from SAP
In SAP ABAP systems that permit external operating-system commands, integrate TFPrint as an external program:
- Prepare the TFPrint command
Install the SDK on the execution host and test a command with your layout, input data and output destination. Start with the Windows or Linux samples. Check file access under the runtime account. - Configure the SAP call
With your SAP administrator, define the allowed external command inSM69and invoke it throughSXPG_COMMAND_EXECUTE. Follow SAP's command execution documentation for authorization, arguments and target-host requirements; availability depends on your SAP environment. - Check the result
Wait for completion and retain the process status and stdout/stderr diagnostics. Check the generated file or print queue before reporting success. See TFPrint errors and exit codes.
This is a command-line integration, not a dedicated SAP connector. It does not require a separate TFORMer webservice or TFORMer Server installation.
Apply a License
- Automatic licensing
If automatic license lookup finds a suitable license, omit-L. See License Files and Registry for the lookup rules. - Explicit licensing
Use-Lto supply license data for this invocation.
For example, select a TEC-IT-provided license file by its path:
tfprint -F "MyLayout.tff" -O "output.pdf" -OT PDF -L "file:TFORMer.ini"
Replace the layout and license-file paths with your own files. This example uses data already provided by the layout; add the data options shown in Samples when external input is required. On Windows, the executable is tfprint.exe.
Alternatively, use -L "b64:BASE64_LICENSE_DATA_FROM_TEC_IT" with the Base64 license data supplied by TEC-IT. Keep license data confidential; command-line arguments and scripts may be visible to other users or recorded in logs. See Licensing for redistribution guidance.
Reference and Sample Links
See Quick Start: Create a PDF with TFPrint.
See TFPrint Samples.
Use the TFPrint Command-Line Reference as the complete command and parameter reference. See Interface Guides and API References for installed documentation and the Designer manual download. Use tfprint -H and, on Linux installations that provide it, man tfprint for installed command help. Layout authoring remains documented in the TFORMer Designer manual.
See Working with Data and Configuration for data formats and shared output defaults.