Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sending not formatted data to the printer

Status
Not open for further replies.

enriqcore

Technical User
Apr 26, 2002
18
AR
I am trying to print a PCL file by executing the command lp.
There are printing filters that works when you do that.
I would like those filters to be turned off.
So I read the lp man page, and I found
“PLOT Determines if the data stream is interpreted by the device driver when
formatting the text. If the PLOT mode is off, the text is formatted using the
current values set with the LPRSET ioctl operation.”
“If the PLOT mode is set, no interpretation of the data stream is performed and
the bytes are sent to the printer without modification. Setting the PLOT mode
causes other formatting modes, such as NOFF and NOFL, to be ignored. The default
printer backend, piobe, sends all output in PLOT mode.”
Does anyone know the steps I must follow to accomplish the latter?
Do I have to execute a sequence of commands from the command line? Would it be needed to write a program in C or something like that?
Thanks in advance,
enriqcore
 
If it is a serial connection, you can cat your PCL file directly to the devices. So if the printer is on tty4 you could do...

# cat print.file >> /dev/tty4

also, you might try setting up an new printer defination, and make it as "dumb" as possible. I believe this is called a generic printer in SMIT.

crowe
 
if you did assign print queue on this particular serial prt, you may check your "default print attributes" using smit.

i believe the default is "a" for "print file type", select by F4 to "p" for "pass-through".

 
REPLY TO crowe
==============
Thanks. I 've tried your advice but it seems that the printer isn't a local device. The printer is connected to another machine in the network, it is remote printer, not the AIX I was referring to.
 
REPLY TO crowe
==============
Thanks. I 've tried your advice but it seems that the printer isn't a local device. The printer is connected to another machine in the network, it is remote printer, not the AIX I was referring to.
 
REPLY to Johny2001
==================
I followed the steps you told me and it was Ok.
The only disadvantage is that you must be root to modify an option in the SMIT and in the case of the printer, the print options are changed for all users. Would it be possible to send not formatted data to the printer just for a single user?
 
Create another queue and set it for that user.

I hope it works...
Unix was made by and for smart people.
 
Thanks. I think smart people don't need to be agressive.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top