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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing Paper Tray 1

Status
Not open for further replies.

sKrEwBaLL

Programmer
Aug 20, 2001
8
0
0
GB
Hi,

I need to find out how to switch between paper trays. Is there a Postscript command that can do this? I am using Postscript 3.0.

Regards

Neil
 
Usually you can switch between trays simply by calling out the particular PageSize such as:
<</PageSize [792 1224]>> setpagedevice
This PS line will normally switch the input tray to this page size, 11x17. You can also try to change the Priority of the input trays. Try using this PS line:
<</InputAttributes <</Priority [0] >> >> setpagedevice

To make the second input tray the desired source use this PS line:
<</InputAttributes <</Priority [1] >> >> setpagedevice
 
There isn't a &quot;PostScript command&quot; to switch paper trays. PostScript is device-independent, whereas paper trays are definitely device-specific!

The previous poster put you on the right track. PostScript provides the &quot;setpagedevice&quot; operator to interact with devices. You need to read the documentation that came with your device, or look through the PPD, to determine the exact syntax that you need for the setpagedevice dictionary.

Thomas D. Greer
 
Hi,
I have the same problem and have tried the code above and it does not work.

Here is my situation:
I have a Konica Minotal Bizhub c350. I need to send a postscript file to the printer and the paper source MUST come from Tray 1 (designed for think label printing).

I set the printer to default printing from tray 1, which it does -- I know this from printing a test document and a Test Page from the driver itself.

However, I need to send a Postscript document manually to the printer and it keeps selecting the Tray 3. :(

The command to send the PS file to printer is:

C:\>copy my_postscript_file \\my_computer_name\my_printer_name

The command sends the file to the printer but it does not select papers from Tray 1. Any help would be much appreciated.

I have also tried to put this code in :

featurebegin{
%%BeginFeature: *InputSlot Tray1

userdict /XJXEFIsetpageproperties known
{ << /XJXsettraysel [ 1 ] >> XJXEFIsetpageproperties }
{ /XJXsettraysel where
{ pop 8 XJXsettraysel } if
} ifelse
%%EndFeature


Here is the source of the the PS file to be printed:
----------------------------------------------------------

%!PS-Adobe-3.0
% DRASPINE.PS
% Print Book/Spine Labels
%
% Modified July 19, 1999 by Mike Noakes
% to allow for second line of call numbers
% for French characters.
%
% initialize wait time out variable
%
/waittimeout 0 def
%
%
% ================= SET PAPER SOURCE TO TRAY 1 =========
<</InputAttributes <</Priority [0] >> >> setpagedevice
% =======================================================
% set up to use the new fonts
%
/HEL10 /Helvetica findfont 10 scalefont def
/TR10 /Times-Roman findfont 10 scalefont def
/CO15 /Courier findfont 15 scalefont def
/CO11 /Courier findfont 11 scalefont def
/CB15 /Courier-Bold findfont 15 scalefont def
/CB14 /Courier-Bold findfont 14 scalefont def
/CB12 /Courier-Bold findfont 12 scalefont def
/CB11 /Courier-Bold findfont 11 scalefont def
/CB10 /Courier-Bold findfont 10 scalefont def
/CB7 /Courier-Bold findfont 7 scalefont def
/CB5 /Courier-Bold findfont 5 scalefont def
/GDATA
{
% on the stack is:
% todays date
% book line 1
% book line 2
% book line 3
% book line 4
% book line 5
% book line 6
% book line 7
% book line21
% book line22
% book line23
% book line24
% book line25
% book line26
% book line27
% call number line 1
% call number line 2
% call number line 3
% call number line 4
% call number line 5
% call number line 6
% call number line 7
% call number line 21
% call number line 22
% call number line 23
% call number line 24
% call number line 25
% call number line 26
% call number line 27
/calln27 exch def
/calln26 exch def
/calln25 exch def
/calln24 exch def
/calln23 exch def
/calln22 exch def
/calln21 exch def
/callnl7 exch def
/callnl6 exch def
/callnl5 exch def
/callnl4 exch def
/callnl3 exch def
/callnl2 exch def
/callnl1 exch def
/bookl27 exch def
/bookl26 exch def
/bookl25 exch def
/bookl24 exch def
/bookl23 exch def
/bookl22 exch def
/bookl21 exch def
/bookln7 exch def
/bookln6 exch def
/bookln5 exch def
/bookln4 exch def
/bookln3 exch def
/bookln2 exch def
/bookln1 exch def
/todaydt exch def
} def
/Today
{ moveto CB5 setfont todaydt show } def
/BOOKOUT
{
/ysub exch def
/ypos exch def
/xpos exch def
xpos ypos moveto bookln1 show
xpos ypos moveto bookl21 show
ypos ysub sub /ypos exch def
xpos ypos moveto bookln2 show
xpos ypos moveto bookl22 show
ypos ysub sub /ypos exch def
xpos ypos moveto bookln3 show
xpos ypos moveto bookl23 show
ypos ysub sub /ypos exch def
xpos ypos moveto bookln4 show
xpos ypos moveto bookl24 show
ypos ysub sub /ypos exch def
xpos ypos moveto bookln5 show
xpos ypos moveto bookl25 show
ypos ysub sub /ypos exch def
xpos ypos moveto bookln6 show
xpos ypos moveto bookl26 show
ypos ysub sub /ypos exch def
xpos ypos moveto bookln7 show
xpos ypos moveto bookl27 show
} def
%
% This routine prints a spine label
%
/PrintSpine
{
247.5 0 translate
CB14 setfont
4 83 moveto callnl1 show
4 83 moveto calln21 show
4 70 moveto callnl2 show
4 70 moveto calln22 show
4 57 moveto callnl3 show
4 57 moveto calln23 show
4 44 moveto callnl4 show
4 44 moveto calln24 show
4 31 moveto callnl5 show
4 31 moveto calln25 show
4 18 moveto callnl6 show
4 18 moveto calln26 show
4 5 moveto callnl7 show
4 5 moveto calln27 show
} def
/PrtDra
% This routine prints a book bar code label -
{
GDATA
202 0 Today
CB12 setfont
15 83 11 BOOKOUT
} def
%
% End of Postscript file DRASPINE.PS
%
% *** start output
0 setgray
CO11 setfont
25 756 moveto
(Page: 1 of 39) show
( Printed on 2004 02 26 at 16:14:20) show
90 rotate
-36 -126 translate
99 0 translate
-23 68 moveto
12 0 rlineto
0 -45 rlineto
-12 0 rlineto
closepath
.95 setgray
gsave fill grestore
0 setgray
stroke
CB15 setfont
-21 63 moveto
-90 rotate
(9021) show
90 rotate
(2004 02 26)
(HV7924 .E7 2000 )
( )
( )
( )
(Ethique politique, )
( militaire et )
( c2000. )
( )
( )
( )
( )
(? )
( )
( )
(HV )
(7924 )
(.E7 )
(2000 )
( )
( )
( )
( )
( )
( )
( )
( )
( )
( )
PrtDra
PrintSpine
99 0 translate
CO15 setfont
324 63 moveto
-90 rotate
(9021) show
90 rotate
(2004 02 26)
(PS8501.T9 Z766 2000 )
( )
( )
( )
(Margaret Atwood : works )
( and impact / )
( 2000. )
( )
( )
( )
( )
( )
( )
( )
(PS )
(8501 )
(.T9 )
(Z766 )
(2000 )
( )
( )
( )
( )
( )
( )
( )
( )
( )
PrtDra
PrintSpine
-594 -112.5 translate
CO15 setfont
-21 63 moveto
-90 rotate
(9021) show
90 rotate
(2004 02 26)
(PS8501.T9 Z766 2000 )
( )
( )
( )
(Margaret Atwood : works )
( and impact / )
( 2000. )
( )
( )
( )
( )
( )
( )
( )
(PS )
(8501 )
(.T9 )
(Z766 )
(2000 )
( )
( )
( )
( )
( )
( )
( )
( )
( )
PrtDra
PrintSpine
99 0 translate
CO15 setfont
324 63 moveto
-90 rotate
(9021) show
90 rotate
(2004 02 26)
(PS8501.T9 Z766 2000 )
( )
( )
( )
(Margaret Atwood : works )
( and impact / )
( 2000. )
( )
( )
( )
( )
( )
( )
( )
(PS )
(8501 )
(.T9 )
(Z766 )
(2000 )
( )
( )
( )
( )
( )
( )
( )
( )
( )
PrtDra
PrintSpine
-594 -112.5 translate
CO15 setfont
-21 63 moveto
-90 rotate
(9021) show
90 rotate
(2004 02 26)
(PS8501.T9 Z766 2000 )
( )
( )
( )
(Margaret Atwood : works )
( and impact / )
( 2000. )
( )
( )
( )
( )
( )
( )
( )
(PS )
(8501 )
(.T9 )
(Z766 )
(2000 )
( )
( )
( )
( )
( )
( )
( )
( )
( )
PrtDra
PrintSpine
99 0 translate
CO15 setfont
324 63 moveto
-90 rotate
(9021) show
90 rotate
(2004 02 26)
(R118 .H26 2003 )
( )
( )
( )
(Handbook of health )
( communication / )
( 2003. )
( )
( )
( )
( )
( )
( )
( )
(R )
(118 )
(.H26 )
(2003 )
( )
( )
( )
( )
( )
( )
( )
( )
( )
( )
PrtDra
PrintSpine
-594 -112.5 translate
CO15 setfont
-21 63 moveto
-90 rotate
(9021) show
90 rotate
(2004 02 26)
(NA2000 .G76 2002 )
( )
(Groat, Linda N. )
( )
(Architectural research )
( methods / )
( c2002. )
( )
( )
( )
( )
( )
( )
( )
(NA )
(2000 )
(.G76 )
(2002 )
( )
( )
( )
( )
( )
( )
( )
( )
( )
( )
PrtDra
PrintSpine
99 0 translate
CO15 setfont
324 63 moveto
-90 rotate
(9021) show
90 rotate
(2004 02 26)
(GV181.55 .H45 2002 )
( )
(Henderson, Karla A. )
( )
(Evaluating leisure )
( services : making )
( c2002. )
( )
( )
( )
( )
( )
( )
( )
(GV )
(181.55 )
(.H45 )
(2002 )
( )
( )
( )
( )
( )
( )
( )
( )
( )
( )
PrtDra
PrintSpine
-594 -112.5 translate
CO15 setfont
-21 63 moveto
-90 rotate
(9021) show
90 rotate
(2004 02 26)
(TA666 .T495 2003 )
( )
( )
( )
(Timber engineering / )
( )
( c2003. )
( )
( )
( )
( )
( )
( )
( )
(TA )
(666 )
(.T495 )
(2003 )
( )
( )
( )
( )
( )
( )
( )
( )
( )
( )
PrtDra
PrintSpine
99 0 translate
CO15 setfont
324 63 moveto
-90 rotate
(9021) show
90 rotate
(2004 02 26)
(R726.8 .D376 2003 )
( )
( )
( )
(Death and dying : )
( opposing viewpoints / )
( c2003. )
( )
( )
( )
( )
( )
( )
( )
(R )
(726.8 )
(.D376 )
(2003 )
( )
( )
( )
( )
( )
( )
( )
( )
( )
( )
PrtDra
PrintSpine
showpage



 
I've needed to do something with selecting trays as well, but could never get it done completely in PostScript, so I cheated and used PJL at the head of my PostScript code:

{Esc]%-12345X@PJL
@PJL SET MEDIASOURCE = TRAY1
@PJL ENTER LANGUAGE = POSTSCRIPT
[Ctrl-D]%!
%!PS-Adobe
% All My PostSCript Code


It worked for my circumstances, but I have only tested this to an HP4050 printer. I found this code by examining the postscript ppd file for this printer on my SuSE 9.2 system.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top