lpr/printcap option for printer tray selection
Does anyone know of a way to select a tray other than the default tray? The printer we have is an hp 8000. I would like to do this with a setting in /etc/printcap, but am open to any other suggestions. Also this is for an old version of suse (6.4) and lpr is my only option for printing.
Hello, On Aug 18 13:11 Coach-X wrote:
Does anyone know of a way to select a tray other than the default tray? The printer we have is an hp 8000. I would like to do this with a setting in /etc/printcap, but am open to any other suggestions. Also this is for an old version of suse (6.4) and lpr is my only option for printing.
/etc/printcap is not the right place. Use an appropriate apsfilterrc file. Have a look at http://portal.suse.com/sdb/en/2000/03/jsmeix_print-einrichten-64.html (in particular see the "Special Information" section) and read the comments in the apsfilterrc files. It may also work for 6.4 what is described for SuSE Linux 7.3.: http://portal.suse.com/sdb/en/2002/03/ke_tray.html The general idea how to set a PostScript printer feature is to send an appropriate PostScript code snippet before the data (i.e. the PostScript file) which is to be printed. As HP printers understand also PJL you could alternatively send PJL commands to activate printer features. In both cases you must know which PostScript code snippet or which PJL commands you must send to the printer. If you don't know them ask HP or search via Google. For testing write the PostScript code snippet or the PJL commands into a file (e.g. /tmp/preset.prn) and then send this file followed by a PostScript file which is to be printed to the PostScript printer like cat /tmp/preset.prn file.ps >/dev/lp0 and see whether or not the PostScript printer prints as you want. For the general idea how this works have a look at the section "Setting particular printing options with PJL commands ..." (it is located under item "9. Optional:") in http://portal.suse.com/sdb/en/2003/06/jsmeix_print-cups-filters.html#PCL To set the language to be postscript use @PJL ENTER LANGUAGE = POSTSCRIPT instead of @PJL ENTER LANGUAGE = PCL but if you simply omit this it at all should work as well for a PostScript printer. If and only if /tmp/preset.prn does what you want then integrate this PostScript code snippet or the PJL commands via apsfilterrc into the printing system. If you want to set the default tray via PJL use /tmp/preset.prn like [Esc]%-12345X@PJL @PJL DEFAULT TRAY = TRAY1 [Esc]%-12345X and send it only once to the printer. [Esc] means one escape character (octal character code 033). Pease ask HP (or search via Google) whether or not it is possible to set the tray via PJL and which exact PJL commands you must use. The difference between "@PJL SET TRAY = TRAY1" and "@PJL DEFAULT TRAY = TRAY1" is that "SET" sets it only for one job (after "[Esc]%-12345X" the printer falls back to its default settings) but "DEFAULT" sets it permanently. The defaults persist when the printer is switched off and on. I.e. this is the same as if you set the defaults directly with the printer's menue buttons. Regards, Johannes Meixner -- SUSE LINUX AG, Maxfeldstrasse 5 Mail: jsmeix@suse.de 90409 Nuernberg, Germany WWW: http://www.suse.de/
Hello, On Aug 19 10:43 Johannes Meixner wrote (shortened):
On Aug 18 13:11 Coach-X wrote:
Does anyone know of a way to select a tray other than the default tray? The printer we have is an hp 8000. I would like to do this with a setting in /etc/printcap, but am open to any other suggestions. Also this is for an old version of suse (6.4) and lpr is my only option for printing.
/etc/printcap is not the right place.
Use an appropriate apsfilterrc file.
Alternatively (not tested): Don't use apsfilter at all but use "foomatic-rip" together with an appropriate PPD file for your printer. This means a replacement of the whole aps filtering system by a foomatic-rip based filtering system. You don't need to uninstall the aps filtering system, you can keep it for some queues and for other queues you can use foomatic-rip. The foomatic-rip based filtering system is not included in your old SuSE Linux version and it is of course not supported by YaST or lprsetup. You must download, install, configure and test it on your own. Have a look at http://www.linuxprinting.org/foomatic.html in particular see http://www.linuxprinting.org/lpd-doc.html and http://www.linuxprinting.org/direct-doc.html As foomatic-rip only needs plain Perl it may work for your old SuSE Linux version too. Test it according to http://www.linuxprinting.org/direct-doc.html If and only if "Spooler-Less Printing" works then try to specify foomatic-rip as input filter in /etc/printcap - see http://www.linuxprinting.org/lpd-doc.html The big advantage is that with foomatic-rip you can use the original HP PPD file for your printer and this way you can use all options which are available in HP's PPD file. Regards, Johannes Meixner -- SUSE LINUX AG, Maxfeldstrasse 5 Mail: jsmeix@suse.de 90409 Nuernberg, Germany WWW: http://www.suse.de/
participants (2)
-
Coach-X
-
Johannes Meixner