summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authormsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>2008-10-17 22:12:14 +0000
committermsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>2008-10-17 22:12:14 +0000
commit28b9d139c05c6edd6ebc25f466792b8e806d0fa6 (patch)
tree163559263f51a67069281ee38f8028aa68407b55 /examples
parent6e8b116d7f9487b7ffec4be46bbbffd3dd13b863 (diff)
downloadcups-28b9d139c05c6edd6ebc25f466792b8e806d0fa6.tar.gz
Merge changes from CUPS 1.4svn-r8067 (tentative CUPS 1.4b1)
git-svn-id: svn+ssh://src.apple.com/svn/cups/easysw/current@1021 a1ca3aef-8c08-0410-bb20-df032aa958be
Diffstat (limited to 'examples')
-rw-r--r--examples/Makefile128
-rw-r--r--examples/color.drv44
-rw-r--r--examples/constraint.drv48
-rw-r--r--examples/custom.drv41
-rw-r--r--examples/grouping.drv36
-rw-r--r--examples/laserjet-basic.drv88
-rw-r--r--examples/laserjet-pjl.drv101
-rw-r--r--examples/minimum.drv26
-rw-r--r--examples/postscript.drv46
-rw-r--r--examples/r300-basic.drv75
-rw-r--r--examples/r300-colorman.drv85
-rw-r--r--examples/r300-remote.drv85
12 files changed, 803 insertions, 0 deletions
diff --git a/examples/Makefile b/examples/Makefile
new file mode 100644
index 000000000..928d71c15
--- /dev/null
+++ b/examples/Makefile
@@ -0,0 +1,128 @@
+#
+# "$Id$"
+#
+# PPD compiler example makefile for the Common UNIX Printing System (CUPS).
+#
+# Copyright 2007-2008 by Apple Inc.
+# Copyright 2002-2005 by Easy Software Products.
+#
+# These coded instructions, statements, and computer programs are the
+# property of Apple Inc. and are protected by Federal copyright
+# law. Distribution and use rights are outlined in the file "LICENSE.txt"
+# which should have been included with this file. If this file is
+# file is missing or damaged, see the license at "http://www.cups.org/".
+#
+
+#
+# Include standard definitions...
+#
+
+include ../Makedefs
+
+
+#
+# Examples...
+#
+
+EXAMPLES = \
+ color.drv \
+ constraint.drv \
+ custom.drv \
+ grouping.drv \
+ laserjet-basic.drv \
+ laserjet-pjl.drv \
+ minimum.drv \
+ postscript.drv \
+ r300-basic.drv \
+ r300-colorman.drv \
+ r300-remote.drv
+
+
+#
+# Make everything...
+#
+
+all:
+
+
+#
+# Make library targets...
+#
+
+libs:
+
+
+#
+# Make unit tests...
+#
+
+unittests:
+
+
+#
+# Clean everything...
+#
+
+clean:
+
+
+#
+# Dummy depend...
+#
+
+depend:
+
+
+#
+# Install all targets...
+#
+
+install: all install-data install-headers install-libs install-exec
+
+
+#
+# Install data files...
+#
+
+install-data:
+ $(INSTALL_DIR) $(DATADIR)/examples
+ for file in $(EXAMPLES); do \
+ $(INSTALL_DATA) $$file $(DATADIR)/examples; \
+ done
+
+
+#
+# Install programs...
+#
+
+install-exec:
+
+
+#
+# Install headers...
+#
+
+install-headers:
+
+
+#
+# Install libraries...
+#
+
+install-libs:
+
+
+#
+# Uninstall files...
+#
+
+uninstall:
+ for file in $(EXAMPLES); do \
+ $(RM) $(DATADIR)/examples/$$file; \
+ done
+ -$(RMDIR) $(DATADIR)/examples
+
+
+#
+# End of "$Id$".
+#
diff --git a/examples/color.drv b/examples/color.drv
new file mode 100644
index 000000000..69984c4b9
--- /dev/null
+++ b/examples/color.drv
@@ -0,0 +1,44 @@
+// Include standard font and media definitions
+#include <font.defs>
+#include <media.defs>
+
+// List the fonts that are supported, in this case all standard
+// fonts...
+Font *
+
+// Manufacturer and version
+Manufacturer "Foo"
+Version 1.0
+
+// Each filter provided by the driver...
+Filter application/vnd.cups-raster 100 rastertofoo
+
+// Supported page sizes
+*MediaSize Letter
+MediaSize A4
+
+{
+ // Supported resolutions
+ *Resolution k 8 0 0 0 "600dpi/600 DPI"
+
+ // Specify the model name and filename...
+ ModelName "FooJet 2000"
+ PCFileName "foojet2k.ppd"
+}
+
+{
+ // Supports color printing
+ ColorDevice true
+
+ // Supported colorspaces
+ ColorModel Gray/Grayscale w chunky 0
+ *ColorModel RGB/Color rgb chunky 0
+
+ // Supported resolutions
+ *Resolution - 8 0 0 0 "300dpi/300 DPI"
+ Resolution - 8 0 0 0 "600dpi/600 DPI"
+
+ // Specify the model name and filename...
+ ModelName "FooJet Color"
+ PCFileName "foojetco.ppd"
+}
diff --git a/examples/constraint.drv b/examples/constraint.drv
new file mode 100644
index 000000000..6acb7f106
--- /dev/null
+++ b/examples/constraint.drv
@@ -0,0 +1,48 @@
+// Include standard font and media definitions
+#include <font.defs>
+#include <media.defs>
+
+// List the fonts that are supported, in this case all standard
+// fonts...
+Font *
+
+// Manufacturer, model name, and version
+Manufacturer "Foo"
+ModelName "FooJet 2000"
+Version 1.0
+
+// Each filter provided by the driver...
+Filter application/vnd.cups-raster 100 rastertofoo
+
+// Supported page sizes
+*MediaSize Letter
+MediaSize A4
+
+// Supported resolutions
+*Resolution k 8 0 0 0 "600dpi/600 DPI"
+
+// Installable Option Group
+Group "InstallableOptions/Options Installed"
+
+ // Duplexing unit option
+ Option "Option1/Duplexing Unit" Boolean AnySetup 10
+ Choice True/Installed ""
+ *Choice "False/Not Installed" ""
+
+// General Option Group
+Group General
+
+ // Duplexing option
+ Option "Duplex/Two-Sided Printing" PickOne AnySetup 10
+ *Choice "None/No" "<</Duplex false>>setpagedevice"
+ Choice "DuplexNoTumble/Long Edge Binding"
+ "<</Duplex true/Tumble false>>setpagedevice"
+ Choice "DuplexTumble/Short Edge Binding"
+ "<</Duplex true/Tumble true>>setpagedevice"
+
+// Only allow duplexing if the duplexer is installed
+UIConstraints "*Duplex *Option1 False"
+
+// Specify the name of the PPD file we want to generate...
+PCFileName "foojet2k.ppd"
+
diff --git a/examples/custom.drv b/examples/custom.drv
new file mode 100644
index 000000000..1001c4fc1
--- /dev/null
+++ b/examples/custom.drv
@@ -0,0 +1,41 @@
+// Include standard font and media definitions
+#include <font.defs>
+#include <media.defs>
+
+// List the fonts that are supported, in this case all standard
+// fonts...
+Font *
+
+// Manufacturer, model name, and version
+Manufacturer "Foo"
+ModelName "FooJet 2000"
+Version 1.0
+
+// Each filter provided by the driver...
+Filter application/vnd.cups-raster 100 rastertofoo
+
+// Supported page sizes
+*MediaSize Letter
+MediaSize A4
+
+// Supported resolutions
+*Resolution k 8 0 0 0 "600dpi/600 DPI"
+
+// Option Group
+Group "Footasm"
+
+ // Boolean option
+ Option "fooEnhance/Resolution Enhancement" Boolean AnySetup 10
+ *Choice True/Yes "<</cupsCompression 1>>setpagedevice"
+ Choice False/No "<</cupsCompression 0>>setpagedevice"
+
+ // Multiple choice option
+ Option "fooOutputType/Output Quality" PickOne AnySetup 10
+ *Choice "Auto/Automatic Selection" "<</OutputType(Auto)>>setpagedevice"
+ Choice "Text/Optimize for Text" "<</OutputType(Text)>>setpagedevice"
+ Choice "Graph/Optimize for Graphics" "<</OutputType(Graph)>>setpagedevice"
+ Choice "Photo/Optimize for Photos" "<</OutputType(Photo)>>setpagedevice"
+
+// Specify the name of the PPD file we want to generate...
+PCFileName "foojet2k.ppd"
+
diff --git a/examples/grouping.drv b/examples/grouping.drv
new file mode 100644
index 000000000..da66d74fc
--- /dev/null
+++ b/examples/grouping.drv
@@ -0,0 +1,36 @@
+// Include standard font and media definitions
+#include <font.defs>
+#include <media.defs>
+
+// List the fonts that are supported, in this case all standard
+// fonts...
+Font *
+
+// Manufacturer and version
+Manufacturer "Foo"
+Version 1.0
+
+// Each filter provided by the driver...
+Filter application/vnd.cups-raster 100 rastertofoo
+
+// Supported page sizes
+*MediaSize Letter
+MediaSize A4
+
+{
+ // Supported resolutions
+ *Resolution k 8 0 0 0 "600dpi/600 DPI"
+
+ // Specify the model name and filename...
+ ModelName "FooJet 2000"
+ PCFileName "foojet2k.ppd"
+}
+
+{
+ // Supported resolutions
+ *Resolution k 8 0 0 0 "1200dpi/1200 DPI"
+
+ // Specify the model name and filename...
+ ModelName "FooJet 2001"
+ PCFileName "foojt2k1.ppd"
+}
diff --git a/examples/laserjet-basic.drv b/examples/laserjet-basic.drv
new file mode 100644
index 000000000..6924ed7b8
--- /dev/null
+++ b/examples/laserjet-basic.drv
@@ -0,0 +1,88 @@
+// Include standard font and media definitions
+#include <font.defs>
+#include <media.defs>
+
+// Include HP-PCL driver definitions
+#include <pcl.h>
+
+// Specify that this driver uses the HP-PCL driver...
+DriverType pcl
+
+// Specify the driver options via the model number...
+ModelNumber ($PCL_PAPER_SIZE $PCL_PJL $PCL_PJL_RESOLUTION)
+
+// List the fonts that are supported, in this case all standard
+// fonts...
+Font *
+
+// Manufacturer and driver version
+Manufacturer "HP"
+Version 1.0
+
+// Supported page sizes and their margins
+HWMargins 18 12 18 12
+*MediaSize Letter
+MediaSize Legal
+MediaSize Executive
+MediaSize Monarch
+MediaSize Statement
+MediaSize FanFoldGermanLegal
+
+HWMargins 18 12.72 18 12.72
+MediaSize Env10
+
+HWMargins 9.72 12 9.72 12
+MediaSize A4
+MediaSize A5
+MediaSize B5
+MediaSize EnvC5
+MediaSize EnvDL
+MediaSize EnvISOB5
+MediaSize Postcard
+MediaSize DoublePostcard
+
+// Only black-and-white output with mode 3 compression...
+ColorModel Gray k chunky 3
+
+// Supported resolutions
+Resolution - 1 0 0 0 "300dpi/300 DPI"
+*Resolution - 8 0 0 0 "600dpi/600 DPI"
+
+// Supported input slots
+*InputSlot 7 "Auto/Automatic Selection"
+InputSlot 2 "Manual/Tray 1 - Manual Feed"
+InputSlot 4 "Upper/Tray 1"
+InputSlot 1 "Lower/Tray 2"
+InputSlot 5 "LargeCapacity/Tray 3"
+
+// Tray 3 is an option...
+Installable "OptionLargeCapacity/Tray 3 Installed"
+UIConstraints "*OptionLargeCapacity False *InputSlot LargeCapacity"
+
+{
+ // HP LaserJet 2100 Series
+ Throughput 10
+ ModelName "LaserJet 2100 Series"
+ PCFileName "hpljt211.ppd"
+}
+
+{
+ // LaserJet 2200 and 2300 series have duplexer option...
+ Duplex normal
+ Installable "OptionDuplex/Duplexer Installed"
+ UIConstraints "*OptionDuplex False *Duplex"
+
+ {
+ // HP LaserJet 2200 Series
+ Throughput 19
+ ModelName "LaserJet 2200 Series"
+ PCFileName "hpljt221.ppd"
+ }
+
+ {
+ // HP LaserJet 2300 Series
+ Throughput 25
+ ModelName "LaserJet 2300 Series"
+ PCFileName "hpljt231.ppd"
+ }
+}
diff --git a/examples/laserjet-pjl.drv b/examples/laserjet-pjl.drv
new file mode 100644
index 000000000..32a0bc4f0
--- /dev/null
+++ b/examples/laserjet-pjl.drv
@@ -0,0 +1,101 @@
+// Include standard font and media definitions
+#include <font.defs>
+#include <media.defs>
+
+// Include HP-PCL driver definitions
+#include <pcl.h>
+
+// Specify that this driver uses the HP-PCL driver...
+DriverType pcl
+
+// Specify the driver options via the model number...
+ModelNumber ($PCL_PAPER_SIZE $PCL_PJL $PCL_PJL_RESOLUTION)
+
+// List the fonts that are supported, in this case all standard
+// fonts...
+Font *
+
+// Manufacturer and driver version
+Manufacturer "HP"
+Version 2.0
+
+// Supported page sizes and their margins
+HWMargins 18 12 18 12
+*MediaSize Letter
+MediaSize Legal
+MediaSize Executive
+MediaSize Monarch
+MediaSize Statement
+MediaSize FanFoldGermanLegal
+
+HWMargins 18 12.72 18 12.72
+MediaSize Env10
+
+HWMargins 9.72 12 9.72 12
+MediaSize A4
+MediaSize A5
+MediaSize B5
+MediaSize EnvC5
+MediaSize EnvDL
+MediaSize EnvISOB5
+MediaSize Postcard
+MediaSize DoublePostcard
+
+// Only black-and-white output with mode 3 compression...
+ColorModel Gray k chunky 3
+
+// Supported resolutions
+Resolution - 1 0 0 0 "300dpi/300 DPI"
+*Resolution - 8 0 0 0 "600dpi/600 DPI"
+
+// Supported input slots
+*InputSlot 7 "Auto/Automatic Selection"
+InputSlot 2 "Manual/Tray 1 - Manual Feed"
+InputSlot 4 "Upper/Tray 1"
+InputSlot 1 "Lower/Tray 2"
+InputSlot 5 "LargeCapacity/Tray 3"
+
+// Tray 3 is an option...
+Installable "OptionLargeCapacity/Tray 3 Installed"
+UIConstraints "*OptionLargeCapacity False *InputSlot LargeCapacity"
+
+// PJL options
+Attribute cupsPJL cupsRET "@PJL SET SMOOTHING=%?False:OFF;%?True:ON;%n"
+
+Option "cupsRET/Smoothing" Boolean DocumentSetup 10
+ Choice "False/Off" ""
+ *Choice "True/On" ""
+
+Attribute cupsPJL cupsTonerSave "@PJL SET ECONOMODE=%?False:OFF;%?True:ON;%n"
+
+Option "cupsTonerSave/Save Toner" Boolean DocumentSetup 10
+ *Choice "False/No" ""
+ Choice "True/Yes" ""
+
+{
+ // HP LaserJet 2100 Series
+ Throughput 10
+ ModelName "LaserJet 2100 Series PJL"
+ PCFileName "hpljt212.ppd"
+}
+
+{
+ // LaserJet 2200 and 2300 series have duplexer option...
+ Duplex normal
+ Installable "OptionDuplex/Duplexer Installed"
+ UIConstraints "*OptionDuplex False *Duplex"
+
+ {
+ // HP LaserJet 2200 Series
+ Throughput 19
+ ModelName "LaserJet 2200 Series PJL"
+ PCFileName "hpljt222.ppd"
+ }
+
+ {
+ // HP LaserJet 2300 Series
+ Throughput 25
+ ModelName "LaserJet 2300 Series PJL"
+ PCFileName "hpljt232.ppd"
+ }
+}
diff --git a/examples/minimum.drv b/examples/minimum.drv
new file mode 100644
index 000000000..ac6e38db0
--- /dev/null
+++ b/examples/minimum.drv
@@ -0,0 +1,26 @@
+// Include standard font and media definitions
+#include <font.defs>
+#include <media.defs>
+
+// List the fonts that are supported, in this case all standard
+// fonts...
+Font *
+
+// Manufacturer, model name, and version
+Manufacturer "Foo"
+ModelName "FooJet 2000"
+Version 1.0
+
+// Each filter provided by the driver...
+Filter application/vnd.cups-raster 100 rastertofoo
+
+// Supported page sizes
+*MediaSize Letter
+MediaSize A4
+
+// Supported resolutions
+*Resolution k 8 0 0 0 "600dpi/600 DPI"
+
+// Specify the name of the PPD file we want to generate...
+PCFileName "foojet2k.ppd"
+
diff --git a/examples/postscript.drv b/examples/postscript.drv
new file mode 100644
index 000000000..ebb02f8a0
--- /dev/null
+++ b/examples/postscript.drv
@@ -0,0 +1,46 @@
+// Include standard font and media definitions
+#include <font.defs>
+#include <media.defs>
+
+// Specify this is a PostScript printer driver
+DriverType ps
+
+// List the fonts that are supported, in this case all standard fonts
+Font *
+
+// Manufacturer, model name, and version
+Manufacturer "Foo"
+ModelName "Foo LaserProofer 2000"
+Version 1.0
+
+// PostScript printer attributes
+Attribute DefaultColorSpace "" Gray
+Attribute LandscapeOrientation "" Minus90
+Attribute LanguageLevel "" "3"
+Attribute Product "" "(Foo LaserProofer 2000)"
+Attribute PSVersion "" "(3010) 0"
+Attribute TTRasterizer "" Type42
+
+// Supported page sizes
+*MediaSize Letter
+MediaSize Legal
+MediaSize A4
+
+// Query command for page size
+Attribute "?PageSize" "" "
+ save
+ currentpagedevice /PageSize get aload pop
+ 2 copy gt {exch} if (Unknown)
+ 23 dict
+ dup [612 792] (Letter) put
+ dup [612 1008] (Legal) put
+ dup [595 842] (A4) put
+ {exch aload pop 4 index sub abs 5 le exch
+ 5 index sub abs 5 le and
+ {exch pop exit} {pop} ifelse
+ } bind forall = flush pop pop
+ restore"
+
+// Specify the name of the PPD file we want to generate
+PCFileName "fooproof.ppd"
+
diff --git a/examples/r300-basic.drv b/examples/r300-basic.drv
new file mode 100644
index 000000000..e203d511d
--- /dev/null
+++ b/examples/r300-basic.drv
@@ -0,0 +1,75 @@
+// Include standard font and media definitions
+#include <font.defs>
+#include <media.defs>
+
+// Include ESC/P driver definitions
+#include <escp.h>
+
+// Specify that this driver uses the ESC/P driver...
+DriverType escp
+
+// Specify the driver options via the model number...
+ModelNumber ($ESCP_ESCK $ESCP_EXT_UNITS $ESCP_EXT_MARGINS $ESCP_USB
+ $ESCP_PAGE_SIZE $ESCP_RASTER_ESCI)
+
+// List the fonts that are supported, in this case all standard
+// fonts...
+Font *
+
+// Manufacturer and driver version
+Manufacturer "Epson"
+Version 1.0
+
+// Supported page sizes and their margins
+HWMargins 8.4 0 8.4 0
+*MediaSize Letter
+MediaSize Legal
+MediaSize Executive
+MediaSize Statement
+MediaSize A4
+MediaSize A5
+MediaSize A6
+MediaSize B5
+MediaSize Env10
+MediaSize EnvC5
+MediaSize EnvDL
+MediaSize EnvISOB5
+MediaSize Postcard
+MediaSize DoublePostcard
+
+VariablePaperSize Yes
+MinSize 1in 4in
+MaxSize 8.5in 44in
+
+// Four color modes are supported...
+ColorModel Gray/Grayscale w chunky 1
+ColorModel Black k chunky 1
+*ColorModel RGB/Color rgb chunky 1
+ColorModel CMYK cmyk chunky 1
+
+// Supported resolutions
+Resolution - 8 90 0 103 "360dpi/360 DPI"
+*Resolution - 8 90 0 206 "720dpi/720 DPI"
+Resolution - 8 90 0 412 "1440dpi/1440 DPI"
+
+// Very basic dithering settings
+Attribute cupsInkChannels "" 6
+Attribute cupsInkLimit "" 2.0
+
+Attribute cupsCyanLtDk "" "0.5 1.0"
+Attribute cupsMagentaLtDk "" "0.5 1.0"
+
+Attribute cupsAllDither 360dpi "0.5 0.75 1.0"
+Attribute cupsAllDither 720dpi "0.6 0.9 1.2"
+Attribute cupsAllDither 1440dpi "0.9 1.35"
+
+Attribute cupsESCPDotSize 360dpi 16
+Attribute cupsESCPDotSize 720dpi 17
+Attribute cupsESCPDotSize 1440dpi 18
+
+{
+ // EPSON Stylus Photo R300 Series
+ Throughput 1
+ ModelName "Stylus Photo R300"
+ PCFileName "epspr301.ppd"
+}
diff --git a/examples/r300-colorman.drv b/examples/r300-colorman.drv
new file mode 100644
index 000000000..ddaf58ec7
--- /dev/null
+++ b/examples/r300-colorman.drv
@@ -0,0 +1,85 @@
+// Include standard font and media definitions
+#include <font.defs>
+#include <media.defs>
+
+// Include ESC/P driver definitions
+#include <escp.h>
+
+// Specify that this driver uses the ESC/P driver...
+DriverType escp
+
+// Specify the driver options via the model number...
+ModelNumber ($ESCP_ESCK $ESCP_EXT_UNITS $ESCP_EXT_MARGINS $ESCP_USB
+ $ESCP_PAGE_SIZE $ESCP_RASTER_ESCI $ESCP_REMOTE)
+
+// List the fonts that are supported, in this case all standard
+// fonts...
+Font *
+
+// Manufacturer and driver version
+Manufacturer "Epson"
+Version 3.0
+
+// Supported page sizes and their margins
+HWMargins 0 0 0 0
+*MediaSize Letter
+MediaSize Legal
+MediaSize Executive
+MediaSize Statement
+MediaSize A4
+MediaSize A5
+MediaSize A6
+MediaSize B5
+MediaSize Env10
+MediaSize EnvC5
+MediaSize EnvDL
+MediaSize EnvISOB5
+MediaSize Postcard
+MediaSize DoublePostcard
+
+VariablePaperSize Yes
+MinSize 1in 4in
+MaxSize 8.5in 44in
+
+// Borderless printing offset...
+Attribute cupsESCPFP "" 0
+
+// Four color modes are supported...
+ColorModel Gray/Grayscale w chunky 1
+ColorModel Black k chunky 1
+*ColorModel RGB/Color rgb chunky 1
+ColorModel CMYK cmyk chunky 1
+
+// Supported resolutions
+Resolution - 8 90 0 103 "360dpi/360 DPI"
+*Resolution - 8 90 0 206 "720dpi/720 DPI"
+Resolution - 8 90 0 412 "1440dpi/1440 DPI"
+
+// Paper trays...
+*InputSlot 0 "Auto/Auto Select"
+InputSlot 1 "Manual/Manual Feed"
+
+Attribute cupsESCPPP 0 "1 255"
+Attribute cupsESCPPP 1 "2 1"
+
+// Very basic dithering settings
+Attribute cupsInkChannels "" 6
+Attribute cupsInkLimit "" 3.0
+
+Attribute cupsCyanLtDk "" "0.5 1.0"
+Attribute cupsMagentaLtDk "" "0.5 1.0"
+
+Attribute cupsAllDither 360dpi "0.5 0.75 1.0"
+Attribute cupsAllDither 720dpi "0.6 0.9 1.2"
+Attribute cupsAllDither 1440dpi "0.9 1.35"
+
+Attribute cupsESCPDotSize 360dpi 16
+Attribute cupsESCPDotSize 720dpi 17
+Attribute cupsESCPDotSize 1440dpi 18
+
+{
+ // EPSON Stylus Photo R300 Series
+ Throughput 1
+ ModelName "Epson Stylus Photo R300"
+ PCFileName "epspr303.ppd"
+}
diff --git a/examples/r300-remote.drv b/examples/r300-remote.drv
new file mode 100644
index 000000000..c3065d00c
--- /dev/null
+++ b/examples/r300-remote.drv
@@ -0,0 +1,85 @@
+// Include standard font and media definitions
+#include <font.defs>
+#include <media.defs>
+
+// Include ESC/P driver definitions
+#include <escp.h>
+
+// Specify that this driver uses the ESC/P driver...
+DriverType escp
+
+// Specify the driver options via the model number...
+ModelNumber ($ESCP_ESCK $ESCP_EXT_UNITS $ESCP_EXT_MARGINS $ESCP_USB
+ $ESCP_PAGE_SIZE $ESCP_RASTER_ESCI $ESCP_REMOTE)
+
+// List the fonts that are supported, in this case all standard
+// fonts...
+Font *
+
+// Manufacturer and driver version
+Manufacturer "Epson"
+Version 2.0
+
+// Supported page sizes and their margins
+HWMargins 0 0 0 0
+*MediaSize Letter
+MediaSize Legal
+MediaSize Executive
+MediaSize Statement
+MediaSize A4
+MediaSize A5
+MediaSize A6
+MediaSize B5
+MediaSize Env10
+MediaSize EnvC5
+MediaSize EnvDL
+MediaSize EnvISOB5
+MediaSize Postcard
+MediaSize DoublePostcard
+
+VariablePaperSize Yes
+MinSize 1in 4in
+MaxSize 8.5in 44in
+
+// Borderless printing offset...
+Attribute cupsESCPFP "" -80
+
+// Four color modes are supported...
+ColorModel Gray/Grayscale w chunky 1
+ColorModel Black k chunky 1
+*ColorModel RGB/Color rgb chunky 1
+ColorModel CMYK cmyk chunky 1
+
+// Supported resolutions
+Resolution - 8 90 0 103 "360dpi/360 DPI"
+*Resolution - 8 90 0 206 "720dpi/720 DPI"
+Resolution - 8 90 0 412 "1440dpi/1440 DPI"
+
+// Paper trays...
+*InputSlot 0 "Auto/Auto Select"
+InputSlot 1 "Manual/Manual Feed"
+
+Attribute cupsESCPPP 0 "1 255"
+Attribute cupsESCPPP 1 "2 1"
+
+// Very basic dithering settings
+Attribute cupsInkChannels "" 6
+Attribute cupsInkLimit "" 2.0
+
+Attribute cupsCyanLtDk "" "0.5 1.0"
+Attribute cupsMagentaLtDk "" "0.5 1.0"
+
+Attribute cupsAllDither 360dpi "0.5 0.75 1.0"
+Attribute cupsAllDither 720dpi "0.6 0.9 1.2"
+Attribute cupsAllDither 1440dpi "0.9 1.35"
+
+Attribute cupsESCPDotSize 360dpi 16
+Attribute cupsESCPDotSize 720dpi 17
+Attribute cupsESCPDotSize 1440dpi 18
+
+{
+ // EPSON Stylus Photo R300 Series
+ Throughput 1
+ ModelName "Epson Stylus Photo R300"
+ PCFileName "epspr302.ppd"
+}