splp Command

Purpose

Changes or displays printer driver settings.

Syntax

splp-b Option ] [  -B Number] [  -c Option ] [  -C Option ] [  -e Option ] [  -f Option ] [  -F! ] [  -i Number ] [  -l Number ] [  -n Option ] [  -N Option ] [  -p Option ] [  -P Option ] [  -r Option ] [  -s Number ] [  -S Option ] [  -t Option ] [  -T Number ] [  -w Number ] [  -W Option ] [ DevicePath ]

Description

The splp command changes or displays settings for a printer device driver. The default device path is /dev/lp0; all flags are optional. If the device path does not begin with a / (backslash) character, the /dev directory is assumed. Also, if no flags are specified, the splp command reports the current settings for the specified device path. To change the current settings, specify the appropriate flags. No other processing is done, and there is no other output.

The changes that the splp command makes remain in effect until the next time you restart the system or rerun the splp command. The splp command can be run from the /etc/inittab command file to configure your printer each time you start up the system.

Note: The splp command settings for the -b, -c, -C, -f, -i, -l, -n, -p, -r, -t, -w, and -W flags apply only when data is sent directly to the printer device (for example, redirecting the output of the cat command directly to the specifies device path). When files are queued for printing with the enq, qprt, lp, or lpr commands, the settings for these flags are ignored and are not changed.

Flags

Item Description
-b Option Specifies whether backspaces are sent to the printer:
+
Specifies backspaces be sent to the printer.
!
Specifies backspaces be discarded.
-B Number Sets the speed to the specified number of bits per second. Values for the Number variable are 50, 75, 110, 134, 150, 300, 600, 1200, 1800, 2400, 4800, 9600, 19,200, and 38,400.
-c Option Specifies whether carriage returns are sent to the printer:
+
Sends carriage returns to the printer.
!
Translates carriage returns to line feeds.
-C Option Specifies whether all lowercase characters are converted to uppercase characters:
+
Converts lowercase characters to uppercase characters.
!
Does not convert lowercase characters to uppercase characters.
-e Option Specifies the processing to be performed when an error is detected:
+
Returns an error.
!
Waits until error clears.
-f Option Specifies whether the printer is sent form feeds or simulates a form feed with line feeds or carriage returns:
+
Sends form feeds to the printer.
!
Simulates a form feed with line feeds or carriage returns.
-F! Resets font status indicators for an 3812 Page Printer or an 3816 Page Printer. This flag causes fonts to be reloaded from the printer's font diskette into the printer's memory by the next spooled print job. This flag should be specified if the printer has been turned off and then turned back on, or if the fonts in the printer's memory have become corrupted.
-i Number Indents the specified number of columns, where the value of the Number variable is an integer.
-l Number Prints the specified number of lines per page, where the value of the Number variable is an integer.
-n Option Specifies whether the printer is sent line feeds or translates line feeds to carriage returns:
+
Sends line feeds to the printer.
!
Translates line feeds to carriage returns.
-N Option Specifies whether parity generation and detection is enabled:
+
Enables parity generation and detection.
!
Disables parity generation and detection.
-p Option Specifies whether the system sends all characters to the printer unmodified or translates characters according to the settings for the -b, -c, -C, -f, -i, -l, -n, -r, -t, -w, and -W flags:
+
Sends all characters to the printer unmodified, overriding other settings.
!
Translates characters according to the settings.
-P Option Specifies the parity:
+
Specifies odd parity.
!
Specifies even parity.
-r Option Specifies whether carriage returns are added after line feeds:
+
Sends a carriage return after a line feed.
!
Does not send a carriage return after a line feed.
-s Number Selects character size where the Number variable is the number of bits. Values for the Number variable can be 5, 6, 7, or 8. See the termio.h special file for additional information on character size.
-S Option Specifies the number of stop bits per character:
+
2 stop bits per character.
!
1 stop bit per character.
-t Option Specifies whether tabs are to be expanded:
+
Does not expand tabs.
!
Expands tabs on 8 position boundaries.
-T Number Sets the time-out period to the number of seconds specified by the Number variable. The value of the Number variable must be an integer.
-w Number Prints the number of columns specified by the Number variable. The value of the Number variable must be an integer.
-W Option Specifies whether to wrap characters beyond the specified width to the next line and print ... (3 dots) after the new-line character:
+
Wraps characters beyond the specified width to the next line and prints ... (3 dots) after the new-line character.
!
Truncates characters beyond the specified width.

Examples

  1. To display the current printer settings for the /dev/lp0 printer, enter:
    splp
  2. To change the printer settings, enter:

    splp   -w 80  -W +  -C +

    This changes the settings of the /dev/lp0 printer for 80-column paper (the -w 80 flag). It also wraps each line that is more than 80 columns wide onto a second line (the -W+ flag), and prints all alphabetic characters in uppercase (the -C+ flag).

Files

Item Description
/dev/lp* Contains the printer attribute file.
/etc/inittab Contains the printer configuration command file.