AIX Printer Tips: Sending Printer Commands to Printers
Contents
About This Document
Cautions
Method One - Put Commands in File and cat
Method Two - Use Virtual Printer ci Attribute
About This Document
The purpose of this document is to show how to send individual
print commands to printers. First you will need to determine the
print command that you want to send by looking at the printer programming
or technical reference manual.
This document describes how you can
enter the commands in AIX either using a file or a virtual printer, and
then send these commands to the printer. This might be useful
for sending a command that is not normally sent with the virtual printer,
or even used for downloading fonts or printer macros.
The information in this document applies to AIX 3.2.5 and 4.
Cautions
Some commands sent to printers this way will be overwritten by other commands
if you later print through a virtual printer. If this is a problem,
add the commands to the end of the ci attribute in the virtual printer.
The other thing that can cause problems is that some commands are reset
each time the printer reset command is sent to the printer. The printer
reset command is usually sent to the printer before and after a print job
by the ci and cr attributes. You may have to remove the printer reset
command if it causes problems.
Method One - Put Commands in file and cat
This could be used to download macros and the like.
-
Create a file with vi.
-
Enter commands using sequence ctrl-V ESC to enter the escape character.
-
x01 can be entered as ctrl-V ctrl-A, x02 -> ctrl-B, etc.
-
The ESCAPE character will look like ^[ or ctrl-<left square bracket>
-
Save the file.
-
cat to the printer.
-
If local printer (/dev file),
-
put in passthrough with splp -p+ lp2.
-
cat file to print - cat <filename> > /dev/lp2
-
If a remote queue with no formatting simply print the file to the queue.
-
if JetDirect attached printer send with
-
piohpnpf -x<hostname> <filename>
Method Two - Use Virtual Printer ci Attribute
-
Add a virtual printer as type generic.
-
Use lsvirprt to modify the virtual printer.
-
Set ci=<command string>
-
Use \33 for escape, at AIX 4, \x1b also can be used.
-
Example: ci=\33&l7.5C sets the Vertical Motion Index for a PCL
printer.
-
If you have a percent sign in the sequence it must be entered twice.
Sending Printer Commands to Printers: AIX Printer Tips: send2prt.html ITEM: FAX
Dated: 99/02/12~00:00 Category: zap
This HTML file was generated 99/06/24~12:42:08
Comments or suggestions?
Contact us