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