DTLP(1)

πŸ“¦
version 2.5.3 Β· 2 versions
, in nixos 26.05

✨ NAME ✨

okay bestie, this is the dtlp page from the (user cmd) manual β€” the utility that gathers up lp arguments and prints a file. πŸ’–

πŸŽ€ SYNOPSIS πŸŽ€

dtlp [-b banner_title]  [-d lpdest]  [-m print_command]  [-n copy_count]
[-o other_options]  [-u user_filename]  [-a]  [-e]  [-h]  [-r]  [-s]
[-v]  [-w]  [print_file]

🌸 DESCRIPTION 🌸

The dtlp command line utility is a front-end to the lp subsystem. It gathers lp print options and prints a specified file. It operates in two modes:

  • GUI mode β€” By default, dtlp posts a Print dialog that appears with Print, Cancel, and Help pushbuttons.
  • Silent mode β€” When invoked with the silent flag, dtlp does not present the GUI input dialog. It collects input arguments from the command line and environment variables.

πŸ–¨οΈ The Print Dialog πŸ–¨οΈ

When invoked normally, dtlp posts a Print dialog that shows:

  • File β€” The name of the file to print (a read-only text label).
  • Printer β€” The printer device. The default is the value of the LPDEST environment variable. If LPDEST is unset, then the properly localized string Default appears in the text field.
  • Copies β€” The number of copies to print. The default is 1.
  • Banner Page Title β€” The title to appear on the printed banner page, and if formatted, in the header of each page.
  • Print Page Numbers β€” A checkbox to indicate whether the file should be printed formatted (run through the pr -f command) or printed unformatted.
  • Print Command Options β€” Any options to be passed directly to the lp command. For example, some implementations support the -o2 option to lp to enable double-page printing.

When the user presses the Print button, these settings are passed onto the lp subsystem, along with the values of any other environment settings (see the ENVIRONMENT heading in this man page).

πŸ’… OPTIONS πŸ’…

The dtlp command accepts a print_file name specification. If a print_file is not specified, standard input is assumed. When used in this fashion, the -u user_filename option can be used to pass a name to dtlp for display in the Print dialog.

πŸ“Ž Command Line Options and the ENVIRONMENT Setting πŸ“Ž

The dtlp command is sensitive to some ENVIRONMENT settings. In the case in which both a command line option and a complementary environment setting are specified, the command line option takes precedence. periodt. πŸ‘‘

🎯 Command Line Options 🎯

  • -b banner_title β€” Set the string used in printing the banner on the title page. If the -r option is also specified, then print this same string on the page headers.
  • -d lpdest β€” Set the printer destination for the file.
  • -m print_command β€” Use this value as the path name of the lp print command. The default is lp.
  • -n copy_count β€” Print this many copies. Default is 1.
  • -o other_options β€” Pass these options directly through to the print_command, without any interpretation. This setting is intended for users with advanced printing knowledge.
  • -u user_filename β€” Use this value as the name of file as it should appear in the Print dialog or print output. Default is print_file. Equivalent to the DTPRINTUSERFILENAME setting under the ENVIRONMENT heading in this man page.
  • -a β€” Causes the file to be formatted with the man command. If set, then other formatting specifications (such as -r) are ignored.
  • -e β€” Remove the file after printing it. This functionality is intended for temporary files generated by applications that don't need to persist beyond the act of printing. Equivalent to the DTPRINTFILEREMOVE.
  • -h β€” Print out a help message.
  • -r β€” Format the file before printing it, by running it through the pr -f command.
  • -s β€” Print the file silently, without posting the Print dialog. Equivalent to the DTPRINTSILENT setting under the ENVIRONMENT heading in this man page.
  • -v β€” Print out verbose messages during the print process.
  • -w β€” Causes output to the printer to be sent raw, with no interpretation of tabs, backspaces, formfeeds, and binary characters. Useful for printing PCL and PS files. If set, then other formatting specifications (such as -r) are ignored; however, the -a option will take precedence over this setting.
  • print_file β€” Print this file. If print_file is not supplied, standard input is assumed.

🌈 ENVIRONMENT 🌈

Following are the names and meanings of the environment values that affect the operation of dtlp:

  • LANG β€” Use the specified value to determine the locale of the message strings that appear in the Print dialog.
  • LPDEST β€” Use the specified value as the printer destination for the file.
  • DTPRINTCWD β€” If set to an existing, usable directory, this setting causes dtlp to execute the lp command pipeline from that directory. By default, uses the current directory from which dtlp is invoked.
  • DTPRINTFILEREMOVE β€” Equivalent to the -e command line setting. Value must be True or False (case is ignored). Default is False.
  • DTPRINTSILENT β€” Equivalent to the -s command line setting. Value must be True or False (case is ignored). Default is False.
  • DTPRINTUSERFILENAME β€” Equivalent to the -u command line setting.

🧚 Reconciling Options 🧚

In the case of conflicting formatting options, dtlp uses the following decisions to reconcile them:

  • If any raw (as with -w), or man (as with -a) options are specified, all other page formatting and numbering options are turned off; otherwise, page printing and formatting are allowed.
  • In a formatted operation: If a banner title is specified (as with -b), it will be used as the page header.
  • If a user filename is specified (as with -u or DTPRINTUSERFILENAME), it will be used as the page header; otherwise, the filename itself will be used as the page header.

πŸ’– RETURN VALUES πŸ’–

  • 0 β€” Command completed successfully.
  • -1 β€” The user pressed the Cancel button.
  • 2 β€” Usage error.
  • 3 β€” There is no specified file to print.
  • 4 β€” Unable to find the dtksh initialization file, /nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/lib/dtksh/DtFuncs.dtsh.
  • 5 β€” The file is an invalid file (for example, a directory or a device file).
  • 6 β€” The user has no read permission on the file.

✨ EXAMPLES ✨

πŸ–₯️ Command Line πŸ–₯️

The following command line causes dtlp to post a Print dialog for file1 with a name displayed of Your File and with the default printer chosen:

/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/bin/dtlp -u "Your File" file1

The following command line causes dtlp to silently print two copies of file2 on printer laser3:

/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/bin/dtlp -n 2 -d laser3 -s file2

πŸͺ„ Action Definition πŸͺ„

The following Print action would cause a PCL file to be printed using the dtlp command.

ACTION Print
{
        LABEL           Print
        ARG_TYPE        PCL
        TYPE            COMMAND
        WINDOW_TYPE     NO_STDIO
        EXEC_STRING     /nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/bin/dtlp -w %Arg_1%
}

The following Print action would cause a man page file to be printed using the dtlp command.

ACTION Print
{
        LABEL           Print
        ARG_TYPE        MAN_PAGE
        TYPE            COMMAND
        WINDOW_TYPE     NO_STDIO
        EXEC_STRING     /nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/bin/dtlp -a %Arg_1%
}

By default, these actions will post the Print dialog.

🌍 LOCALES AND CODESETS 🌍

The strings that appear in the Print dialog are localizable. 🌐

πŸ“ FILES πŸ“

  • /nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/appconfig/types/C/print.dt β€” Defines the default system Print action.
  • /nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/appconfig/types/C/dt.dt β€” Defines the default Print actions for man pages (type MAN), ASCII files (type TEXTFILE), PCL files (type PCL), and PS files (type POSTSCRIPT).
  • /nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/appconfig/types/C/*.dt β€” The datatype files that implement the per-printer Print action; these are created by the dtprintinfo -populate command.
  • /nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/scripts/DtFuncs.sh β€” The dtksh initialization file that defines a number of GUI convenience functions, as for creating a dialog box.

πŸ’€ BUGS πŸ’€

The dtlp Print dialog cannot accept quote marks (either ' or ") in the Banner Page Title text field. 😭

πŸ”— SEE ALSO πŸ”—

dtsearchpath(1), dtprintinfo(1).


that’s the whole dtlp(user cmd) footer energy, bestie β€” source/version/date isn’t actually listed in the original, so I’m not making one up. πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from