summaryrefslogtreecommitdiff
path: root/dviware/dvipsconfig/config.tray3
blob: f553e30ae7fa69e4c7c0aef536aca0162cd3e820 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
%!
% config.tray3
% Configuration and header file for dvips. Load with: dvips -P tray3
%
% Selects paper from "tray 3"
%   - often this is the large capacity / lower cassette.
% This should work with these HP LaserJet printers:
%   4/4M Plus PS 300 + 600
%   4V/4MV PostScript
%   5/5M PostScript, 5P/5MP PostScript
%   5Si/5Si MX PS, 5Si Mopier PS
% This is very unlikely to work with these HP LaserJet printers because they
% select trays via media type and not media position:
%   4Si/4SiMX PS 300dpi + 600dpi
%   4/4M PS 600 dpi
% Tested with:
%   gs 5.10, ...
% Will be silently ignored by a PS level 1 PostScript interpreter,
% or any other which doesn't know /MediaPosition.
%
% This file is built so it can be used both as the header file for
% PostScript and as the configuration file for dvips.
% (Note that dvips ignores any lines beginning with a space or a "%".)
%
% Copyright (C) 1995-2006 by Volker Kuhlmann.
% Released under the terms of the GNU General Public License (GPL) Version 2.
% See http://www.gnu.org/ for details.
%
% Steffen Klupsch <steffen@klupsch.de>
%   15 Mar 2000
% Volker Kuhlmann <VolkerKuhlmann@gmx.de>
%   21 Mar 2000
%
 /setpagedevice where
 	{
 	%dup { pstack flush pop pop } forall pstack flush
 	pop % remove dict name
 	% check whether pagedevice dict has /DeferredMediaSelection
 	% (gs 3.33 has setpagedevice, but error on /DeferredMediaSelection)
 	/hasDMS false def
 	currentpagedevice
 		{
 		/DeferredMediaSelection eq { /hasDMS true def } if
 		pop % throw value of key
 		} forall
 	hasDMS {
 	  <<
 		/DeferredMediaSelection true	% what exactly is this?
 	  >> 
 	  setpagedevice
 	} if
 	% gs 5.10, 6.0: error on /MediaPosition
 	currentpagedevice /MediaPosition known {
 		<<
 		/MediaPosition 1		% select tray
 		>>
 		setpagedevice
 	} if
 } if
%
 { % start a procedure so PostScript `ignores' the dvips configuration part.
h config.tray3
 } pop % PostScript cleanup
%
% EOF config.tray3