Tray 3 is installed and the paper size is correct. I set tray 3 paper size to letter and paper type to ltrhead so that all paper type 'plain' goes to tray 2. I need to print labels to tray 3 and don't want anything else printing to this tray. I've tried to following and several variations with all printing to tray2:
lpr -S printer_name -P raw -o PAGESIZE=LETTER MEDIATYPE=LTRHEAD c:\temp\output.ps
The 'lpr' protocol itself has no understanding of paper size, paper type, etc.
Setting such attributes is handled by whichever spooler 'lpr' directs the print request to, when that spooler generates the appropriate print stream containing the data and (printer-language dependent) control sequences.
You don't mention (or I've missed it if you did) what operating system you are invoking the 'lpr' command from.
I suspect, from the context, that it is a Windows-based system, and that you are probably sending the 'output.ps' file direct to the TCP/IP port on the printer known as 'printer_name' in the hosts file.
If this IS the case, then the media size and media source values are likely to have been set within that PostScript file; if the values are not set explicitly there, then the printer will use its power-on user-defined default settings.
Your extrapolation is correct. My OS is Windows 2000 Server. I only assumed that this would work because I gave similar commands to a different printer, HP laserjet 4200tn, and was successful in printing to the lower tray. Is there anyway around what you described?
>> I only assumed that this would work because I gave
>> similar commands to a different printer, HP laserjet
>> 4200tn, and was successful in printing to the lower
>> tray. Is there anyway around what you described?
Not easily.
Your output.ps PostScript file will probably contain within it the PostScript commands directing the printer to use a particular paper source; the directive may address the tray indirectly (to allow for a degree of abstraction) via tray identifiers (rather than directly via tray numbers).
This may have worked on the LJ4200tn because the mapping between identifiers and real trays provided you with what you wanted on that printer.
You can't change the mapping on individual printers, so you'd have to change the directives in the PostScript file in order to select a different tray on a different printer (and you'd have to know the mapping to know what identifier to use).
Or it could be that your PostScript file does not contain any tray selection directives at all, hence paper is pulled from the printer's default tray; for printers with multiple trays, the default tray can usually be set via the front panel (or web server interface).
You can, of course, examine the contents of your PostScript file: just open the file using a text editor (NotePad will do); most PostScript uses only ASCII characters; you should be able to follow some of it fairly intuitively, especially if you remember that PostScript uses a 'post-fix' notation (e.g. '4 5 add' will provide a result of 9).
So you might be able to change the PostScript itself to select a different paper source.
With 'lpr' on Windows systems, i think that the only '-o' option recognised is '-o l', theoretically used to indicate a binary file (but this is not usually necessary even with binary files).
With 'lpr' on Unix/Linux systems, the command usually generates a print request via the spooler (could be BSD, lpsched, CUPS, etc.) on that system.
It is this spooler (and its sub-components) which reacts (or not) to the '-o' options, although even these will not usually do much with files (e.g. your output.ps) which are considered to be already formatted using a printer language.
i.e. the options are usually only effective when the input file is plain text.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.