xref: /aosp_15_r20/external/libcups/examples/postscript.drv (revision 5e7646d21f1134fb0638875d812ef646c12ab91e)
1*5e7646d2SAndroid Build Coastguard Worker// Include standard font and media definitions
2*5e7646d2SAndroid Build Coastguard Worker#include <font.defs>
3*5e7646d2SAndroid Build Coastguard Worker#include <media.defs>
4*5e7646d2SAndroid Build Coastguard Worker
5*5e7646d2SAndroid Build Coastguard Worker// Specify this is a PostScript printer driver
6*5e7646d2SAndroid Build Coastguard WorkerDriverType ps
7*5e7646d2SAndroid Build Coastguard Worker
8*5e7646d2SAndroid Build Coastguard Worker// List the fonts that are supported, in this case all standard fonts
9*5e7646d2SAndroid Build Coastguard WorkerFont *
10*5e7646d2SAndroid Build Coastguard Worker
11*5e7646d2SAndroid Build Coastguard Worker// Manufacturer, model name, and version
12*5e7646d2SAndroid Build Coastguard WorkerManufacturer "Foo"
13*5e7646d2SAndroid Build Coastguard WorkerModelName "Foo LaserProofer 2000"
14*5e7646d2SAndroid Build Coastguard WorkerVersion 1.0
15*5e7646d2SAndroid Build Coastguard Worker
16*5e7646d2SAndroid Build Coastguard Worker// PostScript printer attributes
17*5e7646d2SAndroid Build Coastguard WorkerAttribute DefaultColorSpace "" Gray
18*5e7646d2SAndroid Build Coastguard WorkerAttribute LandscapeOrientation "" Minus90
19*5e7646d2SAndroid Build Coastguard WorkerAttribute LanguageLevel "" "3"
20*5e7646d2SAndroid Build Coastguard WorkerAttribute Product "" "(Foo LaserProofer 2000)"
21*5e7646d2SAndroid Build Coastguard WorkerAttribute PSVersion "" "(3010) 0"
22*5e7646d2SAndroid Build Coastguard WorkerAttribute TTRasterizer "" Type42
23*5e7646d2SAndroid Build Coastguard Worker
24*5e7646d2SAndroid Build Coastguard Worker// Supported page sizes
25*5e7646d2SAndroid Build Coastguard Worker*MediaSize Letter
26*5e7646d2SAndroid Build Coastguard WorkerMediaSize Legal
27*5e7646d2SAndroid Build Coastguard WorkerMediaSize A4
28*5e7646d2SAndroid Build Coastguard Worker
29*5e7646d2SAndroid Build Coastguard Worker// Query command for page size
30*5e7646d2SAndroid Build Coastguard WorkerAttribute "?PageSize" "" "
31*5e7646d2SAndroid Build Coastguard Worker      save
32*5e7646d2SAndroid Build Coastguard Worker      currentpagedevice /PageSize get aload pop
33*5e7646d2SAndroid Build Coastguard Worker      2 copy gt {exch} if (Unknown)
34*5e7646d2SAndroid Build Coastguard Worker      23 dict
35*5e7646d2SAndroid Build Coastguard Worker              dup [612 792] (Letter) put
36*5e7646d2SAndroid Build Coastguard Worker              dup [612 1008] (Legal) put
37*5e7646d2SAndroid Build Coastguard Worker              dup [595 842] (A4) put
38*5e7646d2SAndroid Build Coastguard Worker              {exch aload pop 4 index sub abs 5 le exch
39*5e7646d2SAndroid Build Coastguard Worker               5 index sub abs 5 le and
40*5e7646d2SAndroid Build Coastguard Worker              {exch pop exit} {pop} ifelse
41*5e7646d2SAndroid Build Coastguard Worker      } bind forall = flush pop pop
42*5e7646d2SAndroid Build Coastguard Worker      restore"
43*5e7646d2SAndroid Build Coastguard Worker
44*5e7646d2SAndroid Build Coastguard Worker// Specify the name of the PPD file we want to generate
45*5e7646d2SAndroid Build Coastguard WorkerPCFileName "fooproof.ppd"
46*5e7646d2SAndroid Build Coastguard Worker
47