Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
dtlp(user cmd)							dtlp(user cmd)

NAME
       dtlp -- gather lp arguments and print 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.  The
       dtlp utility 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 com-
		 mand 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  for-
		 matted, 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	unfor-
		 matted.

       Print Command Options
		 Any options to	be passed directly to the lp command.  For ex-
		 ample,	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  environ-
       ment setting are	specified, the command line option takes precedence.

   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.	Equiv-
		 alent to the DTPRINTUSERFILENAME setting under	 the  ENVIRON-
		 MENT 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 in-
		 tended	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	inter-
		 pretation of tabs, backspaces,	formfeeds, and binary  charac-
		 ters.	 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 set-
		 ting.

       print_file
		 Print this file.  If print_file is not	supplied, standard in-
		 put is	assumed.

ENVIRONMENT
       Following are the names and meanings of the environment values that af-
       fect the	operation of dtlp:

       LANG	 Use the specified value to determine the locale of  the  mes-
		 sage 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 in-
		 voked.

       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:

	  o  If	any raw	(as with -w), or man (as with -a) options  are	speci-
	     fied,  all	other page formatting and numbering options are	turned
	     off; otherwise, page printing and formatting are allowed.

	  o  In	a formatted operation: If a banner title is specified (as with
	     -b), it will be used as the page header.

	  o  If	 a  user filename is specified (as with	-u or DTPRINTUSERFILE-
	     NAME), it will be used as the page	header;	otherwise,  the	 file-
	     name 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,
		 /usr/dt/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:
       /usr/dt/bin/dtlp	-u "Your File" file1 The following command line	causes
       dtlp  to	 silently  print  two  copies  of  file2  on  printer  laser3:
       /usr/dt/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     /usr/dt/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     /usr/dt/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
       /usr/dt/appconfig/types/C/print.dt
		 Defines the default system Print action.

       /usr/dt/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).

       /etc/dt/appconfig/types/C/*.dt
		 The  datatype	files that implement the per-printer Print ac-
		 tion; these are created by the	dtprintinfo -populate command.

       /usr/dt/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).

								dtlp(user cmd)

NAME | SYNOPSIS | DESCRIPTION | OPTIONS | ENVIRONMENT | RETURN VALUES | EXAMPLES | LOCALES AND CODESETS | FILES | BUGS | SEE ALSO

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=dtlp&sektion=1&manpath=FreeBSD+12.1-RELEASE+and+Ports>

home | help