[cups] Acquire paper and tray info

Johannes Meixner jsmeix at suse.de
Fri Jan 23 01:02:59 PST 2015


Hello,

On Jan 22 19:08 Helge Blischke wrote (excerpt):

> I just installed this type of printer (as a fake printer using a preview backend)
> on Mac OS X (10.5.8) and discovered two things:
> (1) the Duplex attribute is *not* set by PJL commands but by  PostScript code:
> [{
> %%BeginFeature: *KODuplerx False
> SHKMFeatures /SHKMDuplex false put
> %%EndFeatire
> } stopped cleartomark
> (2) Duplex or not seems only to be selectable by setting the printer defaults
> (at least when using CUPS as the spooler); setting this by job attributes
> is completely ignored.
>
> I guess this issue is due to the fact that duplexing by PS code is specified
> by a name proprietary to Konica Minolta ? KODuplex in this case, which,
> I guess, is not known by the Windows driver as well.

>From my point of view it does not make sense to let on the one hand
the Windows client produce a print job where duplex is activated
but on the other hand apply a "System V style interface script"
for that kind of print job that activates printing it on a
particular form in the printer (via @PJL SET USERMEDIANAME="DV02")
where only printing in simplex mode can work.

I think when printing on that particular form requires simplex mode
then the Windows client must produce a print job where duplex is
at least not activated or where duplex is explicitly deactivated
if duplex is activated by default in the printer.


Paul Mitchell,

to get the Windows printer driver out of the way for your tests
use plain PostScript that prints on two pages as follows:
------------------------------------------------------------------
%!
/Helvetica findfont 20 scalefont setfont
100 200 moveto
(First) show
showpage
200 300 moveto
(Second) show
showpage
------------------------------------------------------------------

In the end when this data
(therein <ESC> is hex 1B and <EOT> is hex 04 ASCII character)
-------------------------------------------------------------------
<ESC>%-12345X at PJL INITIALIZE
@PJL SET USERMEDIANAME="DV02"
@PJL SET DUPLEX=OFF
@PJL ENTER LANGUAGE = POSTSCRIPT
%!
/Helvetica findfont 20 scalefont setfont
100 200 moveto
(First) show
showpage
200 300 moveto
(Second) show
showpage
<EOT>
<ESC>%-12345X at PJL INITIALIZE
<ESC>%-12345X
-------------------------------------------------------------------
is sent to the printer device it should print two sheets of paper
the first sheet with "First" and the second sheet with "Second"
printed on it.

Because you wrote initially "I'm declaring this printer a 'raw' printer"
you can send the above data to the printer device by submitting it
directly on the CUPS server to the 'raw' print queue.

If your CUPS print queue is not a 'raw' queue you can enforce
'raw' printing via:

   lp -d queue_name -o raw print_data_file


Kind Regards
Johannes Meixner
-- 
SUSE LINUX GmbH - GF: Felix Imendoerffer, Jane Smithard, Jennifer Guild,
Dilip Upmanyu, Graham Norton - HRB 21284 (AG Nuernberg)




More information about the cups mailing list