How Can I Control the Number of Copies and the Printer Tray in CUPS?

Since CUPS version 2.2.1 it may happen that the number of job copies in the generated PostScript header is not recognized correctly. As a remedy, you can pass the number of copies directly as a CUPS option - and you can also control the printer tray (InputSlot).

The available CUPS options will be listed with this command

lpoptions -l

TFPrint Option:

-SDK " cupsoptions='copies=3 InputSlot=Manual' " 

TFORMer Library API:

TFormer_SetPrintOptions (hTForm, "cupsoptions='copies=3 InputSlot=Upper'");

Error "CUPS was not found. CUPS support disabled..."

TFORMer SDK (Linux) tries to open the during runtime. If the file is not found you will get the following error message when you start TFPrint:

Warning: Cups was not found.
Cups support will be disabled.
No cups printer named XXX was found on your system.
SetPrinterName caused error!

If you have or on your system then it should work if you set a symbolic link to one of these files called

Empty Sheet with Label Printers (CUPS)

One reason for this problem could be related to the page size. If so the problem could be located in the PPD file.

*PageSize A4/A4: "<</PageSize[595 842]/ImagingBBox null>>setpagedevice"

May be you must also change

*DefaultPageSize: w288h432 --> *DefaultPageSize: A4/A4

How Can I Use Label Printers?

Simply install CUPS on your Linux system if you haven't done so yet.

With CUPS you can use specific drivers for your label printer. Major printer manufacturers like Zebra or Dymo offer CUPS drivers - please check out their home page for actual drivers.

Wrong Output (Fonts) with TFORMer on Linux

In most cases the Arial TTF font is missing.

Thanks to fontconfig you can easily install new TrueType fonts.

Install the fonts for a specific user

Just copy the TrueType files to $HOME/.fonts/ and run:


You must do this under the (all) user account(s), which finally will use TFORMer SDK.

Install the fonts for all users

Just copy the TrueType files to /usr/share/fonts and run (as root!):


Get more infos

You can cache all fonts with verbose output:

fc-cache -v -f

ZLP-II Generation Slow on UNIX/Linux Systems

You can improve the speed of ZPL-II output generation by disabling “Dithering” in the TFORMer.xml configuration file. Set dither-mode=”2”.

<ZEBRA form="A4" orientation="portrait" compression="rle" scaling="0" 
    dont-dither-text="1" dither-mode="2" resolution="203">

Output Direct To Printer (TFPrint)

The following shell script (AIX, HP-UX) shows you how to generate a print file with tfprint and send this file immediately to the printer.


# Test if enough command-line arguments where specified
if test $# != 3
    echo "To few command-line arguments specified"
    echo "Usage:"
    exit 1

# make a temporary file name
PRINTFILE=`mktemp /tmp/tfprint.$$.XXXXXX`
OUTFILE=`mktemp /tmp/tfprint.$$.XXXXXX`
ERRFILE=`mktemp /tmp/tfprint.$$.XXXXXX`

# generate output to the temp file
tfprint -F "$1" -d "$2" -dt xml -o $PRINTFILE -ot ps 1> $OUTFILE 2> $ERRFILE

if test $RETCODE -ne 0
    echo "TFPrint reported an error: $RETCODE"
    # print tfprint stderr
    cat $ERRFILE
    exit $RETCODE

# print tfprint stdout

# print output file
lp -d$3 $PRINTFILE

# remove temporary print file

LANG System Variable Has No Effect on Number Formatting

On Linux TFORMer ignores the system locale (LANG, LC_ALL...) to determine the number format, thus the Format (..) function always uses US format. As a workaround use the following expression to convert the US number format to German or European format.

Format (1111.1, "#,##0.0") = "1,111.1",
Replace(Replace(Replace(Format(float_value, "+#,###,##0.00"), ".", "*"), ",", "."), "*", ","),
Format(float_value, "+#,###,##0.00")
Starting with V7.5.26 there is an SDK option Locale to control the locale (number and date formatting) for the current job.