; Device definitions for EAGLE version 3.5:
;
; [NAME]  device name (as in command line option "-d" or menu)
; @NAME   inherits data from [NAME] (max. nesting level is 10!)
; Type    basic device type (must immediately follow [NAME]):
;
;         DotCol8       dot matrix printer with 8 needles in a column
;         DotCol24      dot matrix printer with 24 needles in a column
;         DotCol48      dot matrix printer with 48 needles in a column
;         DotCol8x24    dot matrix printer with 8 needles in a
;                       column, emulating a 24 needle printer
;         DotCol24x48   dot matrix printer with 24 needles in a column,
;                       emulating a 48 needle printer
;         DotRow        dot matrix printer printing in rows (all HP printers!)
;         PenPlotter    pen plotter
;         PhotoPlotter  photoplotter
;         DrillStation  drill station
;         Generic       generic device (used for e.g. PostScript)
;         CanonLBP8     Canon LBP8 laser printer
;         Calcomp       Calcomp pen plotter
;         CalcompE      CalComp electrostatic plotter
;         Kyocera       Kyocera laser printer
;
; Common parameters for all types of devices:
;
; Long        long name (description) of device
; Init        string to initialize device before printing
; Reset       string to reset device after printing
; ResX/Y      resolution in X/Y direction (dots or steps per inch, default = 1000)
;             for printers: ResX is the resolution in printing direction,
;                           ResY is the resolution in paper feed direction
; CorrectX/Y  used to correct hardware tolerances (default = 1.0)
; OffsetX/Y   defines an offset from the machine's origin (default = 0.0)
; Width       page width (inch) (default = 8.0)
; Height      page height (inch) (default = 12.0)
; Output      name of the output file or port
; Color.NN    color number to use for layer NN, e.g.
;                Color.120 = 3 ; will use color '3' for layer '120'
;
; Parameters for dot matrix printers (DotColXxx and DotRow):
;
; Color       string to set printing color for matrix printer
; GraphicLH   string to switch matrix printer into graphics mode (LoHi form)
; GraphicN    string to switch matrix printer into graphics mode (HP form)
; CR          string for carriage return on matrix printer (default = "\x0D")
; CR1         string for single dot carriage-return/line-feed on matrix printer
;             (default = "")
; CRLF        string for carriage-return/line-feed on matrix printer
;             (default = "\n")
; FF          string  for form-feed on matrix printers (default = "\x0C")
; QumeMode    activates 6-bit Qume mode on 24 needle printers
; Planes      number of color planes for matrix printer (default = 1, b/w)
;
; Parameters for dot matrix printers (DotRow only):
;
; SetWidth    string to set the number of printing columns
; SwapBits    activates swapping of color bits 0 and 1
; Header      string to set the number of rows and columns per page
; Transfer    string to transfer data
; RLE         string to enable Run Length Encoding
;
; Parameters for drawing devices (PenPlotter, PhotoPlotter, DrillStation):
;
; Draw        draw a line to (x, y)
; Move        move the pen to (x, y)
; PenDown     lower the pen
; PenUp       lift the pen
;
; Parameters for pen plotters (PenPlotter):
;
; PenArcCxCyAd           draw an arc from CP to (Cx, Cy) with angle Ad
; PenCircleCxCyRxCxCyRx  draw a circle at (Cx, Cy) with radius Rx
; PenCircleCxCyRxRy      draw a circle at (Cx, Cy) with radius Rx and Ry
; PenCircleRxCxCy        draw a circle at (Cx, Cy) with radius Rx
; PenCircleRxn           draw a circle at CP with radius Rx (negtive!)
; PenCircleRxRx          draw a circle ar CP with radius Rx
; PenSelect              select pen
; PenSpeed               string to set pen speed
; PenDiameter            pen diameter (mm)
; PenVelocity            pen velocity (device dependent value)
;
; Parameters for drill stations (DrillStation):
;
; Select      string to select a tool
; Divide      divides coordinates (default = 1.0)
; Drill       string to drill a hole at (x, y) [with tool]
; Info        string that is copied into the drill info file
; Rack        name of the drill rack file
;
; Parameters for photo plotters (PhotoPlotter):
;
; AutoAperture      string for automatic aperture generation
; Aperture          string to select an aperture
; Flash             string to flash an aperture
; Info              string that is copied into the photo plotter info file
; Wheel             name of the aperture wheel file name
; FirstAperture     number of the first aperture to use with AutoAperture
; ToleranceDrawM    negative draw tolerance
; ToleranceDrawP    positive draw tolerance
; ToleranceFlashM   negative flash tolerance
; ToleranceFlashP   positive flash tolerance
; EmulateApertures  turns aperture emulation on (YES) or off (NO)
; EmulateAnnulus    turns annulus emulation on (YES) or off (NO)
; EmulateThermal    turns thermal emulation on (YES) or off (NO)
;
; Parameters for DrillStation and PhotoPlotter;
;
; Units             the units used in *.GPI and *.DRI files
;                   valid units are Inch, MM and Auto[default] (automatically
;                   chooses the unit with the least decimal digits)
; Decimals          the number of decimals to use when Units is set to Inch
;                   or MM (default = 4). Values are rounded to this number of
;                   decimals.
;
; Parameters for generic devices:
;
; Header1         header string used for PostScript
; Header2         header string used for PostScript
; Header3         header string used for PostScript
; StartPage       string that starts a new page
; EndPage         string that ends a page
; ArcCxCyRWSaEa   string that draws an arc at (Cx, Cy) with Radius, Width, Start angle and End angle
; Bar             string that draws a bar
; Circle          string that draws a circle
; Line            string that draws a line
; Octagon         string that draws an octagon
; Pie             string that draws a pie
; Square          string that draws a square
; HwArcX1Y1CxCyA  string that draws an arc with hardware coordinates
; HwArc           string that draws an arc with hardware coordinates
; HwBar           string that draws a bar with hardware coordinates
; HwCircle        string that draws a circle with hardware coordinates
; HwColor         string that sets teh color
; HwLine          string that draws a line with hardware coordinates
; HwOctagon       string that draws an octagon with hardware coordinates
; HwPie           string that draws a pie with hardware coordinates
; HwPoly1         string that start a polygon with hardware coordinates
; HwPoly2         string that draws a polygon edge with hardware coordinates
; HwPoly3         string that ends a polygon with hardware coordinates
; HwSquare        string that draws a square with hardware coordinates
; HwStartPage     string that starts a page
; HwWidth         string that sets line width with hardware units
; MaxHwWidth      maximum hardware line width
;
; Strings have to be enclosed in double quotes ("...").
; If a double quote has to be part of the string, it must be escaped with
; a backslash, e.g. "abc\"def".
; If a backslash has to appear in the string, it has to be doubled,
; e.g. "abc\\def" would result in abc\def.
; Non-printable characters inside strings are written as "\xhh" with 2
; hex digits, e.g. "\x1B" would mean ESCape; the digits may be upper- or
; lowercase, but it has to be exactly two of them!
; The following characters have special meanings when escaped with
; a backslash:
;
;   \0     NUL      integer 0        \x00
;   \a     BEL      alert            \x07
;   \b     BS       backspace        \x08
;   \f     FF       form feed        \x0C
;   \n     NL (LF)  newline          \x0D\x0A
;   \r     CR       carriage return  \x0D
;   \t     HT       horizontal tab   \x09
;   \v     VT       vertical tab     \x0B
;   \xhh   hh       hex number       \xhh
;
; If a string parameter is too long to fit into one line it can be continued
; on the next line by escaping the end of line with a backslash, e.g.
;    Parameter = "A very long string "  \
;                "which takes several " \ some comment
;                "lines.\n"
; Note that the backslash terminates the line, so everything after the '\'
; character is discarded (this may be used for additional comments).

[EPSONFX]

Type     = DotCol8x24
Long     = "EPSON FX printer"
Init     = "\x1BU\x01"
Reset    = "\x1B@"
GraphicLH= "\x1BZ%c%c"
CR1      = "\x1B\x33\x01\x0D\x1B\x33\x15"
ResX     = 240
ResY     = 216

[EPSONMX]

Type     = DotCol8x24
Long     = "EPSON MX printer"
Init     = "\x1BU\x01"
Reset    = "\x1B@"
GraphicLH= "\x1BL%c%c"
ResX     = 120
ResY     = 216

[CITIZEN]

@EPSONFX
Long     = "CITIZEN MSP-10E/15E printer"

[EPSONEXC]

@EPSONFX
Long     = "EPSON EX-800/1000 Color printer"
Color    = "\x1Br%c"
Planes   = 4

[CITIZEN24E]

@EPSONEXC
Long     = "Citizen 24E Color printer"

[STARNL10]

@EPSONFX
Long     = "star NL-10 printer"

[STARLC10]

Type     = DotCol8x24
Long     = "star LC-10 printer"
Init     = "\x1BU\x01"
Reset    = "\x1B@"
GraphicLH= "\x1BZ%c%c"
ResX     = 240
ResY     = 216

[STARLC10C]

@STARLC10
Long     = "star LC-10 Color printer"
Color    = "\x1Br%c"
Planes   = 4

[EPSONMX8]

Type     = DotCol8
Long     = "EPSON MX printer (8 dots)"
Init     = "\x1BU\x01\x1BA\x08"
Reset    = "\x1B@"
GraphicLH= "\x1BK%c%c"
ResX     = 60
ResY     = 72

[NECP5]

Type     = DotCol24
Long     = "NEC pinwriter P5 (180 dpi)"
Init     = "\x1B3\x18\x1BU\x01\x1Bx\x01"
Reset    = "\x1B2\x1BU\x00\x1Bx\x00"
GraphicLH= "\x1B*\x27%c%c"
ResX     = 180
ResY     = 180

[SL130AI]

@NECP5
Long     = "SEIKOSHA SL-130AI printer"
Init     = "\x1B3\x18\x1BU\x01"
Reset    = "\x1B2\x1BU\x00"

[JETPRO360]

@NECP5
Long     = "Houston Instrument JetPro 360 Plus"
; Add \x1B\C\x00\x10 to the INIT-string for A3 portrait paper

[EPSONLQ]

@NECP5
Long     = "EPSON LQ-1050 printer"

[DPL24D]

Type     = DotCol24
Long     = "Fujitsu DPL24-D printer"
Init     = "\x1B\\"
Reset    = "\x1B/"
GraphicLH= "\x1BH%c%c"
CRLF     = "\x1Bv\x0D"
ResX     = 180
ResY     = 180

[STARLC2410]

@NECP5
Long     = "star LC24-10 printer (180 dpi)"

[STARLC2410HI]

@EPSONSQHI
Long     = "star LC24-10 printer (360 dpi)"

[STARNB24HI]

; Printer must be in IBM-Mode!
Type     = DotCol24
Long     = "star NB24-10/15 printer (360 dpi, IBM-Mode)"
Init     = "\x1BU\x01\x1Bx\x01\x1B3\x18\x1BO"
Reset    = "\x1B@"
GraphicLH= "\x1B*\x28%c%c"
ResX     = 360
ResY     = 180

[NECCP7]

Type     = DotCol24
Long     = "NEC pinwriter CP7 (180 dpi)"
Init     = "\x1B3\x18\x1BU\x01\x1Bx\x01"
Reset    = "\x1B2\x1BU\x00\x1Bx\x00\x1Br\x00"
GraphicLH= "\x1B*\x27%c%c"
Color    = "\x1Br%c"
ResX     = 180
ResY     = 180
Planes   = 4

[OKIMICRO]

@NECCP7
Long     = "OKI Microline 339C printer (180 dpi)"

[OKIMICROHI]

@NECCP7HI
Long     = "OKI Microline 339C printer (360 dpi)"

[EPSONLQ860]

@NECCP7
Long     = "EPSON LQ-860/1060 printer"

[DL1100]

@NECCP7
Long     = "Fujitsu DL1100 printer"
Init     = "\x1B3\x18\x1BU\x01"
Reset    = "\x1B2\x1BU\x00\x1Br\x00"

[BJC600]

@BJC800
Long     = "Canon BJC-600 Bubble Jet"

[BJ800]

Type     = DotCol48
Long     = "Canon BJC-800 Bubble Jet, b/w"
Init     = "\x1B+0"
Reset    = "\x1B@"
GraphicLH= "\x1B*\x48%c%c"
ResX     = 360
ResY     = 360


[BJ800_A3]

Type     = DotCol48
Long     = "Canon BJC-800, DIN_A3, b/w"
Init     = "\x1B\x2B\x30\x1B\C\x00\x11\x1B\Q\x72"
Reset    = "\x1B@"
GraphicLH= "\x1B*\x48%c%c"
ResX     = 360
ResY     = 360
Width    = 11.3
Height   = 15.5

[BJC800]

Type     = DotCol48
Long     = "Canon BJC-800 Bubble Jet"
Init     = "\x1B+0"
Reset    = "\x1B@"
GraphicLH= "\x1B*\x48%c%c"
Color    = "\x1Br%c"
ResX     = 360
ResY     = 360
Planes   = 4

[BJC800_A3]

Type     = DotCol48
Long     = "Canon BJC-800, DIN_A3, color"
Init     = "\x1B\x2B\x30\x1B\C\x00\x11\x1B\Q\x72"
Reset    = "\x1B@"
GraphicLH= "\x1B*\x48%c%c"
Color    = "\x1Br%c"
ResX     = 360
ResY     = 360
Planes   = 4
Width    = 11.3
Height   = 15.5

[BJ130E]

; DIP-Switches: SW1-3=OFF [CR], SW2-1=ON [high density]

Type     = DotCol48
Long     = "Canon BJ-130e Bubble Jet, DIN A4"
Init     = "\x1B[\\\x04\x00\x00\x00h\x01\x1B30\x1BU\x01"
Reset    = "\x1B[K\x01\x00\x00"
GraphicLH= "\x1CCB\x04\x04%c%c"
ResX     = 360
ResY     = 360

[BJ300]

@BJ130E
Long     = "Canon BJ-300/330 Bubble Jet"
; Add \x1B\C\x00\x10 to the INIT-string for A3 portrait paper

[BJ330]

@BJ130E
Long     = "Canon BJ-330 Bubble Jet, DIN A3"
Init     = "\x1B[\\\x04\x00\x00\x00h\x01\x1B30\x1BU\x01\x1B\C\x00\x10"
Width    = 12
Height   = 16

[BJ330-A2]

@BJ130E
Long     = "Canon BJ-330 Bubble Jet, DIN A2"
Init     = "\x1B[\\\x04\x00\x00\x00h\x01\x1B30\x1BU\x01\x1B\C\x00\x17"
Width    = 16
Height   = 23

[BJ230]

Type     = DotCol48
Long     = "Canon BJ230, DIN_A3, b/w"
Init     = "\x1B\x2B\x30\x1B\C\x00\x11\x1B\Q\x72"
Reset    = "\x1B@"
GraphicLH= "\x1B*\x48%c%c"
ResX     = 360
ResY     = 360
Width    = 11.3
Height   = 15.5

[DESIGNJET220]

@HPGL2
Long     = "HP DesignJet 220, HPGL2-Mode"
Init     = "\x1B%%1BIN;IP0,0,100,100SC0,100,0,100"\
           "WU1MC1NP14CR0,15,0,15,0,15"\
           "PC1,15,0,15PC2,0,15,15PC3,0,0,15PC4,15,15,0"\
           "PC5,15,0,0PC6,0,15,0PC7,0,0,0PC8,15,12,15"\
           "PC9,12,15,15PC10,12,12,15PC11,15,15,12PC12,15,12,0"\
           "PC13,12,15,0PC14,11,11,11"\
           "PA;\n"
Reset    = "PG\x1B%%0A\f"
HwColor  = "SP%u" ; (Pen-Number)  precede this line with ';' for b/w

;Use the following as first line of the Init string for A3 sized paper:
;Init     = "\x1B&l27A\x1B%%-1BIN;IP0,0,100,100SC0,100,0,100"\

[DESIGNJET650]
Type     = Generic
Long     = "HP DesigJet 650C, HPGL2 "
Init     = "\x1B%%-12345X@PJL ENTER LANGUAGE = HPGL2\n"\
           "\x1B%%-1BBIN;IP0,0,100,100SC0,100,0,100"\
           "WU1MC1NP14CR0,15,0,15,0,15"\
           "PC1,15,0,15PC2,0,15,15PC3,0,0,15PC4,15,15,0"\
           "PC5,15,0,0PC6,0,15,0PC7,0,0,0PC8,15,12,15"\
           "PC9,12,15,15PC10,12,12,15PC11,15,15,12PC12,15,12,0"\
           "PC13,12,15,0PC14,11,11,11"\
           "PA;\n"
Reset    = "PUSP0PG;"
ResX     = 1016
ResY     = 1016
Bar      = "PW0PU%d,%dRA%d,%d\n"         ; (x1, y1, x2, y2)
HwArcX1Y1CxCyA = "PU%d,%dPDAA%d,%d,%d\n" ; (x1, y1, xc, yc, ArcAngle)
HwColor  = "SP%u" ; (Pen-Number)
HwLine   = "PU%d,%dPD%d,%d\n"
HwPoly1  = "PU%d,%dPM0PA%d,%d"           ; first edge
HwPoly2  = ",%d,%d"                      ; other points
HwPoly3  = "PM2FP;\n"                    ; end of polygon
HwWidth  = "PW%u" ; (Pen-Width)
MaxHwWidth = 5

[TSQ4800]

Type     = DotCol48
Long     = "Epson TSQ-4800 Bubble Jet"
Init     = "\x1B@\x1B+0\x1BU\x01"
Reset    = "\x1B@"
GraphicLH= "\x1B*\x48%c%c"
ResX     = 360
ResY     = 360

[SJ48]

@TSQ4800
Long     = "star StarJet SJ-48"

[STYLUS800]

Type     = DotCol48
Long     = "Epson Stylus 800 Bubble Jet"
Init     = "\x1BU\x01\x1Bx\x01\x1B+\x30"
Reset    = "\x1B2\x1BU\x00\x1Bx\x00"
GraphicLH= "\x1B*\x49%c%c"
ResX     = 360
ResY     = 360

[STYLUS1000]

@STYLUS800
Long     = "Epson Stylus 1000, DIN A4"

[STYLUS1000_A3]

@STYLUS800
Long     = "Epson Stylus 1000, DIN A3"
Init     = "\x1BU\x01\x1Bx\x01\x1B+\x30\x1BC\x00\x10"
Width    = 11
Height   = 17

[STYLUS_FOIL]

@STYLUS800
Long     = "Epson Stylus 800 (Micro Weave Mode)"
Init     = "\x1BU\x01\x1Bx\x01\x1B+\x30\x1B(i101"

[STYLUS800C]

Type     = DotCol48
Long     = "Epson Stylus 800 Color Bubble Jet"
Init     = "\x1BU\x01\x1Bx\x01\x1B+\x30"
Reset    = "\x1B2\x1BU\x00\x1Bx\x00"
GraphicLH= "\x1B*\x49%c%c"
Color    = "\x1Br%c"
ResX     = 360
ResY     = 360
Planes   = 4

[STYLUS_COLOR]

@STYLUS800C

[STYLUS_FOIL_A3]

@STYLUS_PROXL_BW
Long     = "Epson Stylus PRO XL, DIN A3, transparent"
Init     = "\x1BU\x01\x1Bx\x01\x1B+\x30\x1B(i101\x1BC\x00\x10"

[STYLUS_PROXL_BW]

@STYLUS800
Long     = "Epson Stylus PRO XL, DIN A3"
Init     = "\x1BU\x01\x1Bx\x01\x1B+\x30\x1BC\x00\x10"
Width    = 11
Height   = 17

[STYLUS_PROXL_color]

@STYLUS800C
Long     = "Epson Stylus PRO XL, DIN A3, color"
Init     = "\x1BU\x01\x1Bx\x01\x1B+\x30\x1BC\x00\x10"
Width    = 11
Height   = 17

[NECP5HI]

Type     = DotCol24x48
Long     = "NEC pinsriter P5 (360 dpi)"
Init     = "\x1BU\x01\x1Bx\x01"
Reset    = "\x1B2\x1BU\x00\x1Bx\x00"
GraphicLH= "\x1CZ%c%c"
CR1      = "\x1C3\x01\n\x1C3\x2F"
ResX     = 360
ResY     = 360

[NECCP7HI]

Type     = DotCol24x48
Long     = "NEC pinwriter CP7 (360 dpi)"
Init     = "\x1BU\x01\x1Bx\x01"
Reset    = "\x1B2\x1BU\x00\x1Bx\x00"
GraphicLH= "\x1CZ%c%c"
Color    = "\x1Br%c"
CR1      = "\x1C3\x01\n\x1C3\x2F"
ResX     = 360
ResY     = 360
Planes   = 4

[EPSONSQHI]

Type     = DotCol24x48
Long     = "EPSON SQ-850/2550 printer (360 dpi)"
Init     = "\x1BU\x01\x1Bx\x01"
Reset    = "\x1B2\x1BU\x00\x1Bx\x00"
GraphicLH= "\x1B*\x28%c%c"
CR1      = "\x1B+\x01\n\x1B+\x2F"
ResX     = 360
ResY     = 360

[HPLJET]

Type     = DotRow
Long     = "HP LaserJet 2 and compatibles"
Init     = "\x1BE\x1B&l8d1E\x1B*t300R\x1B*r0A"
Reset    = "\x1BE"
GraphicN = "\x1B*b%uW"
RLE      = ""
Width    =  7.75
Height   = 10.80
ResX     = 300
ResY     = 300
FF       = "\x1B*rB\f"

[HPLJET3]

@HPLJET
Long     = "HP LaserJet 3"
RLE      = "\x1B*b1M"
Width    =  7.75
Height   = 10.80

[HPLJET4]

@HPLJET
Long     = "HP LaserJet 4 (600 dpi)"
Init     = "\x1BE\x1B*t600R\x1B*r0A"
ResX     = 600
ResY     = 600

[HPLJET4_A3]

@HPLJET4
Long     = "HP Laserjet4, DIN A3"
Init     = "\x1BE\x1B*t600R\x1B*r0A\x1B&l27A"
Width    = 11
Height   = 17

[HPDJET]

@HPLJET
Long     = "HP DeskJet"
Init     = "\x1BE\x1B&\x6C26A\x1B*t300R\x1B*r0A"
Reset    = ""
RLE      = ""
Width    =  7.75
Height   = 10.50

[HPDJET_850]

@HPLJET
Long     = "HP DeskJet 660/850, b/w 600dpi"
Init     = "\x1BE\x1B&\x6C26A\x1B*t600R\x1B*r0A"
Reset    = ""
RLE      = ""
ResX     = 600
ResY     = 600
Width    =  7.75
Height   = 10.50

[HPDJET_850C]

@HPPJET
Long     = "HP DeskJet 660/850C"
Init     = "\x1B&k0G\x1B&\x6C26A\x1B*t300R\x1B*r-3U\x1B*r0A"
Reset    = "\x1B*rbC"
SetWidth = "\x1B*r%uS"
Width    =  7.75
Height   = 10.50
RLE      = ""
ResX     = 300
ResY     = 300
SwapBits = 1

[HPDJET_FOIL]

@HPDJET
Long     = "HP Deskjet ('shingling'-mode for transparent printing)"
Init     = "\x1BE\x1B&\x6C26A\x1B*t300R\x1B*r0A\x1B*o2Q"

[HPQJET]

@HPLJET
Long     = "HP QuietJet"
Init     = "\x1B*t192R\x1B*rA"
Reset    = ""
RLE      = "" ; don't know if this one supports RLE
Width    =  8.00
Height   = 11.00
ResX     = 192
ResY     = 192

[HPTJET]

@HPLJET
Long     = "HP ThinkJet"
Init     = "\x1BE\x1B&k0W\x1B*r640S\x1B*rA"
RLE      = "" ; no RLE available!
Width    =  6.67
Height   = 11.00
ResX     =  96
ResY     =  96

[HPPJET]

Type     = DotRow
Long     = "HP PaintJet"
Init     = "\x1B&k0G\x1B*t180R\x1B*r3U\x1B*r0A"  \
           "\x1B*v90A\x1B*v88B\x1B*v85C\x1B*v0I" \
           "\x1B*v4A\x1B*v4B\x1B*v6C\x1B*v7I"
Reset    = "\x1B*rB"
GraphicN = "\x1B*b%uV"
RLE      = "\x1B*b1M"
Transfer = "\x1B*b0W"
Width    =  8.00
Height   = 11.00
FF       = "\x1B*rB\f"
ResX     = 180
ResY     = 180
Planes   = 3

[HPDJET500C]

@HPPJET
Long     = "HP DeskJet 500C"
Init     = "\x1B&k0G\x1B&\x6C26A\x1B*t300R\x1B*r-3U\x1B*r0A"
Reset    = "\x1B*rbC"
SetWidth = "\x1B*r%uS"
Width    =  7.75
Height   = 10.50
RLE      = ""
ResX     = 300
ResY     = 300
SwapBits = 1

[HPPJETXL300A]

@HPDJET500C
Long     = "HP PaintJet XL300 (300 dpi, 8 color, rastered)"

[HPPJETXL300B]

@HPLJET
Long     = "HP PaintJet XL300 (300 dpi, black&white)"

[HPPJETXL300C]

@HPGL2
Long     = "HP PaintJet XL300 (150 dpi, 16.8M colors)"
; The HP PaintJet XL300 can print up to 16.8M colors. However, these are
; always created by mixing the basic colors cyan, magenta, and yellow.
; Thus non-basic colors (especially light tones) will appear rastered when
; closely viewed.
;
; The default INIT string of the HPGL2 driver sets the printer up for
;
; 'NP14'                14 pens
; 'CR0,15,0,15,0,15'    a color range from 0 to 15 for each bacic color,
;                       which results in a maximum of 4096 different colors
; 'MC1'                 transparent printing (overlapping colors mix!)
; 'PC 1,15, 0,15'       pen  1: magenta
; 'PC 2, 0,15,15'       pen  2: cyan
; 'PC 3, 0, 0,15'       pen  3: blue
; 'PC 4,15,15, 0'       pen  4: yellow
; 'PC 5,15, 0, 0'       pen  5: red
; 'PC 6, 0,15, 0'       pen  6: green
; 'PC 7, 0, 0, 0'       pen  7: black
; 'PC 8,15,12,15'       pen  8: light magenta
; 'PC 9,12,15,15'       pen  9: light cyan
; 'PC10,12,12,15'       pen 10: light blue
; 'PC11,15,15,12'       pen 11: light yellow
; 'PC12,15,12, 0'       pen 12: light red
; 'PC13,12,15, 0'       pen 13: light green
; 'PC14,11,11,11'       pen 14: grey
;
; You can modify the colors by changing the 'PCn,r,g,b' commands, where
;
; n = pen number
; r = red component
; g = green component
; b = blue component
;
; Note that although the printer has cyan, magenta and yellow as basic
; colors, the 'PC' commands use RGB (red-green-blue) values, according to
; the NTSC specification!

[KXP4450I]

@HPLJET
Long     = "Panasonic KX-P4450i laser printer"
RLE      = "" ; no RLE available!

[HPGL]

Type     = PenPlotter
Long     = "HP-GL plotter"
Init     = "IN; IP 0,0,100,100; SC 0,100,0,100;\n"
Reset    = "PU; SP 0; PA 0,0;\n"
ResX     = 1016
ResY     = 1016
PenSelect  = "SP %u;\n"  ;; Pens numbered 1..n
PenSpeed   = "VS %1.0f;\n"
PenUp      = "PU;\n"
PenDown    = "PD;\n"
Move       = "PA %d,%d;\n"
Draw       = "PA %d,%d;\n"
PenCircleCxCyRxRy = "AA %d,%d,360;\n"   ; (assumes CP is left?!)
PenArcCxCyAd      = "AA %d,%d,%1.2f;\n" ; (assumes CP is at start of arc)
; Cx/y    Center X/Y (long)
; Rx/y    Radius X/Y (long)
; Ad      Angle in degrees (double)

[HPGLX]

@HPGL
Long     = "HP-GL plotter (serial, with Xon/Xoff handshake)"
Init     = "\x1B.I;;17:\x1B.N;19:"\
           "IN; IP 0,0,100,100; SC 0,100,0,100;\n"

[SPL10]

@HPGL
Long     = "Sekonic SPL 10 plotter"

[CX6000]

Type     = PenPlotter
Long     = "C.Itoh CX6000 plotter"
Init     = ""
Reset    = "M0,0\n"
ResX     = 254
ResY     = 254
PenSelect  = "C%u\n"  ;; Pens numbered 0..n-1
Move       = "M%d,%d\n"
Draw       = "D%d,%d\n"

[DXY800]

Type     = PenPlotter
Long     = "Roland DXY-800 plotter"
Init     = ""
Reset    = "J0\nH\n"
ResX     = 254
ResY     = 254
PenSelect  = "J %u\n"
Move       = "M %d,%d\n"
Draw       = "D %d,%d\n"
PenCircleRxRx = "E %d,180,360\nE %d,0,180\n"

[DPX2200]

@HPGL
Long     = "Roland DPX-2200 plotter"

[ADCOMP]

Type     = PenPlotter
Long     = "ADCOMP X 100 plotter"
Init     = ""
Reset    = "M0,0\n"
ResX     = 254
ResY     = 254
PenSelect  = "C%u\n"  ;; Pens numbered 1..n
Move       = "M%d,%d\n"
Draw       = "D%d,%d\n"
PenCircleCxCyRxCxCyRx = "W%d,%d,%d,180,360,1\nW%d,%d,%d,0,180,1\n"

[WX4671]

Type     = PenPlotter
Long     = "Watanabe WX4671 plotter"
Init     = ""
Reset    = "M0,0\n"
ResX     = 254
ResY     = 254
Move       = "M%d,%d\n"
Draw       = "D%d,%d\n"

[HPX84]

Type     = PenPlotter
Long     = "HPX-84 plotter"
Init     = "SH\n"
Reset    = "SH\nAP 0 0\n"
ResX     = 254
ResY     = 254
PenUp    = "SH\n"
PenDown  = "SS\n"
Move     = "AP %d %d\n"
Draw     = "AP %d %d\n"
PenCircleCxCyRxRy = "SH\nAK %d %d %d\n"

[YEWPL]

Type     = PenPlotter
Long     = "Yokogawa PL 1000 plotter"
Init     = "IP 0;IW 0,0,380,250; IP 1;\n"
Reset    = "MA 0,0\n"
ResX     = 254
ResY     = 254
PenSelect  = "PS %u\n"
PenSpeed   = "PV %1.0f\n"
Move       = "MA %d,%d\n"
Draw       = "DA %d,%d\n"
PenCircleRxCxCy = "AC %d,%d,%d,1800,5400\n"

[ADCOMP300]

Type     = PenPlotter
Long     = "ADCOMP X 300 plotter"
Init     = "H\n"
Reset    = "J0\nH\n"
ResX     = 254
ResY     = 254
PenSelect  = "J%u\n"
PenSpeed   = "T%1.0f\n" ;;max(min(sround(PenVelocity / 2), 10), 1)???
Move       = "M%d,%d\n"
Draw       = "D%d,%d\n"
PenCircleCxCyRxRy = "W%d,%d,%d,%d,1800,5400\n"

[MP1000]

Type     = PenPlotter
Long     = "Watanabe MP1000 plotter"
Init     = ""
Reset    = "J0\nH\n"
ResX     = 254
ResY     = 254
PenSelect  = "J%u\n"
PenSpeed   = "T%1.0f\n"
Move       = "M%d,%d\n"
Draw       = "D%d,%d\n"

[EPSONHI80]

@MP1000
Long     = "EPSON HI-80 plotter (Plot-Mode 1)"

[SWEET]

Type     = PenPlotter
Long     = "SWEET-P 100 plotter"
Init     = "RE;\n"
Reset    = "HO;\n"
ResX     = 254
ResY     = 254
PenSpeed   = "VS %1.0f;\n" ;;max(15, sround((PenVelocity * 15) / 75))???
Move       = "MA %d,%d;\n"
Draw       = "DA %d,%d;\n"

[TEWIP281]

Type     = PenPlotter
Long     = "tewidata P 281 plotter"
Init     = "H\n"
Reset    = "HF0\n"
ResX     = 254
ResY     = 254
PenSelect  = "F%u\n"
PenUp      = "H"
PenDown    = "I"
Move       = "%d/%dK\n"
Draw       = "%d/%dK\n"
PenCircleRxn = "O%d,180,540\n" ; Rxn = Radius X (long, negative)

[SE281]

@TEWIP281
Long     = "Goerz Servogor SE 281 plotter"

[RY10MZ]

Type     = PenPlotter
Long     = "Rikadenki RY-10 MZ plotter"
Init     = ""
Reset    = "H\n"
ResX     = 254
ResY     = 254
PenSelect  = "K%u\n"
PenSpeed   = "T%1.0f\n"
Move       = "M%d,%d\n"
Draw       = "D%d,%d\n"
PenCircleCxCyRxRy = "W%d,%d C%d,180,360\n"

[HIDMP]

Type     = PenPlotter
Long     = "Houston Instrument DMP plotter"
Init     = ";:H A EC1 \n"
Reset    = "P0 @\n"
ResX     = 1000
ResY     = 1000
PenSelect  = "P%u\n"
PenSpeed   = "V%1.0f\n"
Move       = "U %d,%d\n"
Draw       = "D %d,%d\n"
PenCircleCxCyRxRy = "CA %d,%d 360\n"

[IBM5202]

Type     = DotCol8
Long     = "IBM 5202 Thermo-Transfer printer"
Init     = "\x1B[\\\x04\x00\x00\x00\xA0\x05\x1B3\x08\x1Bn\x02"
Reset    = ""
GraphicLH= "\x1BZ%c%c"
Pass1    = "\x1B3\x03"
Pass2    = "\x1B3\x2D"
ResX     = 240
ResY     = 240

[P321]

Type     = DotCol24
Long     = "Toshiba P321 printer (Qume-Emulation)"
Init     = "\x1B\x1AI\x1B\x1E\x08\x1B>"
Reset    = "\x1B\x1AI"
GraphicN = "\x1B;%04u"
ResX     = 180
ResY     = 180
QumeMode = 1

[P321X]

@EPSONFX
Long     = "Toshiba P321 printer (without Qume-Emulation)"

[M8510A]

Type     = DotCol8
Long     = "C.Itoh M8510A printer"
Init     = "\x1BT14\x1BP\x1B>"
Reset    = "\x1BA\x1B<\x1BN"
GraphicN = "\x1BS%04u"
ResX     = 160
ResY     =  72
ReverseBits = 1

[MEGASCAN]

Type     = DotRow
Long     = "MegaScan binary file"
ResX     = 300
ResY     = 300
Header   = "%c%c%c%c"

[TIFF]

Type     = DotRow
Long     = "TIFF (Tag Image File Format)"
ResX     = 300
ResY     = 300
Header   = "\x49\x49"         \ Byte order (lsb-msb)
           "\x2A\x00"         \ TIFF Version 42
           "\x08\x00\x00\x00" \ Offset of 1. (and only!) IFD
           "\x11\x00"         \ Number of IFD entries
           "\xFF\x00\x03\x00" \ Subfile Type (SHORT)...
           "\x01\x00\x00\x00" \ ...length = 1
           "\x01\x00\x00\x00" \ ...full resolution image data
           "\x01\x01\x03\x00" \ Image Length (SHORT)...
           "\x01\x00\x00\x00" \ ...length = 1
           "%c%c\x00\x00"     \ ...RowsPerPage
           "\x00\x01\x03\x00" \ Image Width (SHORT)...
           "\x01\x00\x00\x00" \ ...length = 1
           "%c%c\x00\x00"     \ ...ColsPerPage * 8
           "\x02\x01\x03\x00" \ Bits Per Sample (SHORT)...
           "\x01\x00\x00\x00" \ ...length = 1
           "\x01\x00\x00\x00" \ ...1 bit per sample
           "\x03\x01\x03\x00" \ Compression (SHORT)...
           "\x01\x00\x00\x00" \ ...length = 1
           "\x01\x00\x00\x00" \ ...no compression
           "\x06\x01\x03\x00" \ Photometric Interpretation (SHORT)...
           "\x01\x00\x00\x00" \ ...length = 1
           "\x00\x00\x00\x00" \ ...0=white, 1=black
           "\x0A\x01\x03\x00" \ Fill Order (SHORT)...
           "\x01\x00\x00\x00" \ ...length = 1
           "\x01\x00\x00\x00" \ ...msb filled first
           "\x0F\x01\x02\x00" \ Make (ASCII)...
           "\x12\x00\x00\x00" \ ...length + 1
           "\xFA\x00\x00\x00" \ ...offset of data
           "\x11\x01\x04\x00" \ Strip Offset (LONG)...
           "\x01\x00\x00\x00" \ ...length = 1
           "\x0C\x01\x00\x00" \ ...offset of first data byte
           "\x12\x01\x03\x00" \ Orientation (SHORT)...
           "\x01\x00\x00\x00" \ ...length = 1
           "\x01\x00\x00\x00" \ ...(0, 0) is upper left corner
           "\x15\x01\x03\x00" \ Samples Per Pixel (SHORT)...
           "\x01\x00\x00\x00" \ ...length = 1
           "\x01\x00\x00\x00" \ ...1 sample per pixel
           "\x16\x01\x04\x00" \ Rows Per Strip (LONG)...
           "\x01\x00\x00\x00" \ ...length = 1
           "%c%c\x00\x00"     \ ...RowsPerPage
           "\x1A\x01\x05\x00" \ X Resolution (RATIONAL)...
           "\x01\x00\x00\x00" \ ...length = 1
           "\xDA\x00\x00\x00" \ ...offset of data
           "\x1B\x01\x05\x00" \ Y Resolution (RATIONAL)...
           "\x01\x00\x00\x00" \ ...length = 1
           "\xE2\x00\x00\x00" \ ...offset of data
           "\x1C\x01\x03\x00" \ Planar Configuration (SHORT)...
           "\x01\x00\x00\x00" \ ...length = 1
           "\x01\x00\x00\x00" \ ...one single image plane
           "\x1E\x01\x05\x00" \ X Position (RATIONAL)...
           "\x01\x00\x00\x00" \ ...length = 1
           "\xEA\x00\x00\x00" \ ...offset of data
           "\x1F\x01\x05\x00" \ Y Position (RATIONAL)...
           "\x01\x00\x00\x00" \ ...length = 1
           "\xF2\x00\x00\x00" \ ...offset of data
           "\x00\x00\x00\x00" \ Offset of next IFD (none)
           "%c%c\x00\x00"     \ X Resolution (numerator)
           "\x01\x00\x00\x00" \ X Resolution (denominator)
           "%c%c\x00\x00"     \ Y Resolution (numerator)
           "\x01\x00\x00\x00" \ Y Resolution (denominator)
           "\x00\x00\x00\x00" \ X Position (numerator)
           "%c%c\x00\x00"     \ X Position (denominator)
           "\x00\x00\x00\x00" \ Y Position (numerator)
           "%c%c\x00\x00"     \ Y Position (denominator)
           "EAGLE TIFF driver\x00" ; Make string

[EPS]

Type     = Generic
Long     = "Encapsulated PostScript"
ResX     = 254000  ; this gives us editor coordinates!
ResY     = 254000
Width    = 100.00  ; virtually infinite
Height   = 100.00
ArcCxCyRWSaEa = "%d %d %d %d %1.2f %1.2f a\n" ; (CenterX, CenterY, Radius, Width, StartAngle, EndAngle)
Bar      = "%d %d %d %d b\n"             ; (x1, y1, x2, y2)
Circle   = "%d %d %d %d c\n"             ; (x, y, Radius, Width)
Line     = "%d %d %d %d %d l\n"          ; (x1, y1, x2, y2, Width)
Octagon  = "%d %d %d %d %d o\n"          ; (x, y, dx, dy, di)
Pie      = "%d %d %d %d p\n"             ; (x, y, da, di)
Square   = "%d %d %d %d s\n"             ; (x, y, da, di)

Header1  = "%%!PS-Adobe-1.0\n"              \
           "%%%%Title: EAGLE Drawing %s\n"  \
           "%%%%Creator: EAGLE\n"           \
           "%%%%Pages: %d\n"                \
           "%%%%BoundingBox: 0 0 %d %d\n"   \
           "%%%%EndComments\n"              \
           "\n"\
           "%% Coordinate transfer:\n"\
           "\n"\
           "/EU { 254 div 0.072 mul } def\n"\
           "/inch { 72 mul } def\n"\
           "\n"\
           "%% Linestyle:\n"\
           "\n"\
           "1 setlinecap\n"\
           "1 setlinejoin\n"\
           "\n"\
           "%% Drawing functions:\n"\
           "\n"\
           "/l {  %% draw a line\n"\
           "   /lw exch def\n"\
           "   /y2 exch def\n"\
           "   /x2 exch def\n"\
           "   /y1 exch def\n"\
           "   /x1 exch def\n"\
           "   newpath\n"\
           "   x1 EU y1 EU moveto\n"\
           "   x2 EU y2 EU lineto\n"\
           "   lw EU setlinewidth\n"\
           "   stroke\n"\
           "   } def\n"\
           "\n"\
           "/h {  %% draw a hole\n"\
           "   /d  exch def\n"\
           "   /y  exch def\n"\
           "   /x  exch def\n"\
           "   d 0 gt {\n"\
           "     newpath\n"\
           "     x EU y EU d 2 div EU 0 360 arc\n"\
           "     currentgray dup\n"\
           "     1 exch sub setgray\n"\
           "     fill\n"\
           "     setgray\n"\
           "     } if\n"\
           "   } def\n"\
           "\n"\
           "/b {  %% draw a bar\n"\
           "   /y2 exch def\n"\
           "   /x2 exch def\n"\
           "   /y1 exch def\n"\
           "   /x1 exch def\n"\
           "   newpath\n"\
           "   x1 EU y1 EU moveto\n"\
           "   x2 EU y1 EU lineto\n"\
           "   x2 EU y2 EU lineto\n"\
           "   x1 EU y2 EU lineto\n"\
           "   closepath\n"\
           "   fill\n"\
           "   } def\n"\
           "\n"\
           "/c {  %% draw a circle\n"\
           "   /lw exch def\n"\
           "   /rd exch def\n"\
           "   /y  exch def\n"\
           "   /x  exch def\n"\
           "   newpath\n"\
           "   lw EU setlinewidth\n"\
           "   x EU y EU rd EU 0 360 arc\n"\
           "   stroke\n"\
           "   } def\n"\
           "\n"\
           "/a {  %% draw an arc\n"\
           "   /ae exch def\n"\
           "   /as exch def\n"\
           "   /lw exch def\n"\
           "   /rd exch def\n"\
           "   /y  exch def\n"\
           "   /x  exch def\n"\
           "   lw rd 2 mul gt {\n"\
           "     /rd rd lw 2 div add 2 div def\n"\
           "     /lw rd 2 mul def\n"\
           "     } if\n"\
           "   currentlinecap currentlinejoin\n"\
           "   0 setlinecap 0 setlinejoin\n"\
           "   newpath\n"\
           "   lw EU setlinewidth\n"\
           "   x EU y EU rd EU as ae arc\n"\
           "   stroke\n"\
           "   setlinejoin setlinecap\n"\
           "   } def\n"\
           "\n"\
           "/s {  %% draw a square with a hole\n"\
           "   /di exch def\n"\
           "   /da exch def\n"\
           "   /y  exch def\n"\
           "   /x  exch def\n"\
           "   newpath\n"\
           "   x da 2 div sub EU y da 2 div sub EU moveto\n"\
           "   da EU  0 EU rlineto\n"\
           "   0  EU da EU rlineto\n"\
           "   da neg EU 0 EU rlineto\n"\
           "   closepath\n"\
           "   fill\n"\
           "   x y di h\n"\
           "   } def\n"\
           "\n"\
           "/p {  %% draw a pie with a hole\n"\
           "   /di exch def\n"\
           "   /da exch def\n"\
           "   /y  exch def\n"\
           "   /x  exch def\n"\
           "   newpath\n"\
           "   x EU y EU da 2 div EU 0 360 arc\n"\
           "   fill\n"\
           "   x y di h\n"\
           "   } def\n"\
           "\n"\
           "/edge { 0.20710678119 mul } def\n"\
           "\n"\
           "/o {  %% draw an octagon with a hole\n"\
           "   /di exch def\n"\
           "   /dy exch def\n"\
           "   /dx exch def\n"\
           "   /y  exch def\n"\
           "   /x  exch def\n"\
           "   newpath\n"\
           "   dx dy ge {\n"\
           "      x dx 2 div sub EU                    y dy edge  add EU moveto\n"\
           "      x dx dy sub 2 div sub dy edge sub EU y dy 2 div add EU lineto\n"\
           "      x dx dy sub 2 div add dy edge add EU y dy 2 div add EU lineto\n"\
           "      x dx 2 div add EU                    y dy edge  add EU lineto\n"\
           "      x dx 2 div add EU                    y dy edge  sub EU lineto\n"\
           "      x dx dy sub 2 div add dy edge add EU y dy 2 div sub EU lineto\n"\
           "      x dx dy sub 2 div sub dy edge sub EU y dy 2 div sub EU lineto\n"\
           "      x dx 2 div sub EU                    y dy edge  sub EU lineto\n"\
           "      } if\n"\
           "   dx dy lt {\n"\
           "      x dx edge  add EU y dy 2 div add EU                    moveto\n"\
           "      x dx 2 div add EU y dy dx sub 2 div add dx edge add EU lineto\n"\
           "      x dx 2 div add EU y dy dx sub 2 div sub dx edge sub EU lineto\n"\
           "      x dx edge  add EU y dy 2 div sub EU                    lineto\n"\
           "      x dx edge  sub EU y dy 2 div sub EU                    lineto\n"\
           "      x dx 2 div sub EU y dy dx sub 2 div sub dx edge sub EU lineto\n"\
           "      x dx 2 div sub EU y dy dx sub 2 div add dx edge add EU lineto\n"\
           "      x dx edge  sub EU y dy 2 div add EU                    lineto\n"\
           "      } if\n"\
           "   closepath\n"\
           "   fill\n"\
           "   x y di h\n"\
           "   } def\n"\
           "\n"
           ;(Name, NrPages, (x2 - x1) * 0.072 * ScaleFactor, (y2 - y1) * 0.072 * ScaleFactor)

[PS]

@EPS
Long     = "PostScript (printable)"
Width    =  7.75
Height   = 11.00

Header2  = "%% the real drawing size:\n"\
           "\n"\
           "/MinDrawX %6d EU def\n"\
           "/MinDrawY %6d EU def\n"\
           "/MaxDrawX %6d EU def\n"\
           "/MaxDrawY %6d EU def\n"\
           "\n"\
           "%% the usable page size:\n"\
           "\n"\
           "/LeftMargin 0.25 inch def  %% change these if drawing gets clipped!\n"\
           "/BotMargin  0.25 inch def\n"\
           "/PageWidth  %7.4f inch def\n"\
           "/PageHeight %7.4f inch def\n"\
           "\n"\
           "%% are we going to rotate?:\n"\
           "\n"\
           "/RotateDrawing %d 0 ne def\n"\
           "\n"
           ;(x1, y1, x2, y2, Width, Height, DoRotate)

Header3  = "%% Media size functions:\n"\
           "\n"\
           "/AbortMessage {  %% Show a message in a box and stop printing\n"\
           "   /h 100 def\n"\
           "   /Courier findfont 12 scalefont setfont\n"\
           "   mediawidth pagemargin sub h 1 setpage\n"\
           "   newpath\n"\
           "   0 0 moveto\n"\
           "   0 h rlineto\n"\
           "   mediawidth pagemargin sub 0 rlineto\n"\
           "   0 h neg rlineto\n"\
           "   closepath\n"\
           "   5 setlinewidth\n"\
           "   stroke\n"\
           "   newpath 50 60 moveto (ERROR: Jobsize exceeds physical printing area!) show\n"\
           "   newpath 50 40 moveto (       Job has been aborted!) show\n"\
           "   showpage\n"\
           "   stop\n"\
           "   } def\n"\
           "\n"\
           "/SelectPage {  %% Select the page identified by Row and Column\n"\
           "   /Column exch def\n"\
           "   /Row    exch def\n"\
           "\n"\
           "   %% the actually exposed area (if the machine knows these parameters!):\n"\
           "\n"\
           "   /DrawX MaxDrawX MinDrawX sub def\n"\
           "   /DrawY MaxDrawY MinDrawY sub def\n"\
           "   statusdict /setpage known\n"\
           "   statusdict /mediawidth known and\n"\
           "   statusdict /medialength known and\n"\
           "   statusdict /pagemargin known and {\n"\
           "      %% this is for machines that can tell the media size:\n"\
           "      statusdict begin\n"\
           "         /MediaW mediawidth pagemargin sub def\n"\
           "         DrawX DrawY ge {\n"\
           "            DrawX MediaW le DrawY medialength le and {\n"\
           "               MediaW DrawY 1 setpage\n"\
           "               MediaW DrawX sub 2 div 0 translate\n"\
           "               }{\n"\
           "            DrawY MediaW le DrawX medialength le and {\n"\
           "               MediaW DrawX 0 setpage\n"\
           "               0 MediaW DrawY sub 2 div translate\n"\
           "               }{\n"\
           "               AbortMessage\n"\
           "               } ifelse\n"\
           "               } ifelse\n"\
           "            }{\n"\
           "            DrawY MediaW le DrawX medialength le and {\n"\
           "               MediaW DrawX 0 setpage\n"\
           "               0 MediaW DrawY sub 2 div translate\n"\
           "               }{\n"\
           "            DrawX MediaW le DrawY medialength le and {\n"\
           "               MediaW DrawY 1 setpage\n"\
           "               MediaW DrawX sub 2 div 0 translate\n"\
           "               }{\n"\
           "               AbortMessage\n"\
           "               } ifelse\n"\
           "               } ifelse\n"\
           "            } ifelse\n"\
           "         end\n"\
           "      }{\n"\
           "      %% this is for machines that can NOT tell the media size:\n"\
           "      statusdict /setpage known {\n"\
           "         statusdict begin\n"\
           "            RotateDrawing {\n"\
           "               LeftMargin PageHeight add BotMargin DrawY add\n"\
           "               }{\n"\
           "               BotMargin DrawY add LeftMargin DrawX add \n"\
           "               } ifelse\n"\
           "            0 setpage\n"\
           "            end\n"\
           "         } if\n"\
           "      %% set clipping boundary:\n"\
           "      newpath\n"\
           "      LeftMargin BotMargin moveto\n"\
           "      0 PageHeight rlineto\n"\
           "      PageWidth  0 rlineto\n"\
           "      0 PageHeight neg rlineto\n"\
           "      closepath\n"\
           "      clip\n"\
           "      %% set the origin:\n"\
           "      LeftMargin BotMargin translate\n"\
           "      RotateDrawing {\n"\
           "         0 PageHeight translate\n"\
           "         -90 rotate\n"\
           "         PageHeight Column mul neg PageWidth Row mul neg translate\n"\
           "         }{\n"\
           "         PageWidth Column mul neg PageHeight Row mul neg translate\n"\
           "         } ifelse\n"\
           "      } ifelse\n"\
           "   %% move the lower left corner of the drawing to the origin:\n"\
           "   MinDrawX neg MinDrawY neg translate\n"\
           "   \n"\
           "   %% Linestyle:\n"\
           "   \n"\
           "   1 setlinecap\n"\
           "   1 setlinejoin\n"\
           "   \n"\
           "   } def\n"\
           "\n"\
           "%% TheDrawing\n"

StartPage= "\ngsave %d %d SelectPage\n" ;(Row, Column)
EndPage  = "showpage grestore\n"

[PS_DINA3]

@PS
Long    = "Postscript (printable) DIN A3"
Width   = 17.36
Height  = 11.36

[HPGL2]

Type     = Generic
Long     = "HP-GL/2 printer"
Init     = "\x1B%%1BIN;IP0,0,100,100SC0,100,0,100"\
           "WU1MC1NP14CR0,15,0,15,0,15"\
           "PC1,15,0,15PC2,0,15,15PC3,0,0,15PC4,15,15,0"\
           "PC5,15,0,0PC6,0,15,0PC7,0,0,0PC8,15,12,15"\
           "PC9,12,15,15PC10,12,12,15PC11,15,15,12PC12,15,12,0"\
           "PC13,12,15,0PC14,11,11,11"\
           "PA;\n"

;Use the following as first line of the Init string for A3 sized paper:
;Init     = "\x1B&l27A\x1B%%-1BIN;IP0,0,100,100SC0,100,0,100"\

Reset    = "\x1B%%0A\f"
ResX     = 1016
ResY     = 1016
Bar      = "PW0PU%d,%dRA%d,%d\n"         ; (x1, y1, x2, y2)
HwArcX1Y1CxCyA = "PU%d,%dPDAA%d,%d,%d\n" ; (x1, y1, xc, yc, ArcAngle)
HwColor  = "SP%u" ; (Pen-Number)
HwLine   = "PU%d,%dPD%d,%d\n"
HwPoly1  = "PU%d,%dPM0PA%d,%d"           ; first edge
HwPoly2  = ",%d,%d"                      ; other points
HwPoly3  = "PM2FP;\n"                    ; end of polygon
HwWidth  = "PW%u" ; (Pen-Width)
MaxHwWidth = 5

[CANON]

Type     = CanonLBP8
Long     = "Canon LBP-8II laser printer"
Init     = "\x1B<"         \ ResetPrinter
           "\x1B;"         \ EnterIso
           "\x1B[2&z"      \ FullPaintMode
           "\x1B;"         \ EnterIso
           "\x1B[&}"       ; VectorMode
Reset    = "\x7D\x70\x1E"  \ ReturnToText
           "\x1B="         ; ResetParams
Width    =  7.75
Height   = 11.22
ResX     = 300
ResY     = 300
HwArc    = "\x7D\x36\x30%s%s%s%s%s\x1E" ; (xc, yc, Radius, StAngle, ArcAngle)
HwBar    = "\x7D\x3A%s%s%s%s\x1E"       ; (x1, y1, x2, y2)
HwCircle = "\x35%s%s%s\x1E"             ; (x, y, Radius)
HwPie    = "\x35%s%s%s\x1E"             ; (x, y, Radius)
HwSquare = "dummy"                      ; to fix a flaw  in the driver!
HwOctagon= "dummy"                      ; to fix a flaw  in the driver!
HwLine   = "\x31%s%s%s%s\x1E"           ; (x1, y1, x2 - x1, y2 - y1)
HwPoly1  = "\x32%s%s%s%s"
HwPoly2  = "%s%s"
HwPoly3  = "\x1E"
HwWidth  = "\x46\x31%c\x1E"
HwStartPage= "\x23\x1E"                     \ BeginPicture
             "!0#1\x1E"                     \ Scale unit is Dots
             "\x24\x1E"                     \ BeginPictureBody
             "\x28%s%s%s%s\x1E"             \ PictureArea (0, 0, PageWidth, PageHeight)
             "\x2A\x30\x1E\x29%s%s%s%s\x1E" \ ClipRectangle, (-1, PageWidth + 1, -1, PageHeight + 1
             "\x7D\x22%s%s\x1E"             ; Origin Transfer (x0, y0)
EndPage  = "\x25\x1E\f"  ; End Picture, Form Feed

[GERBER]

Type     = PhotoPlotter
Long     = "Gerber photoplotter"
Init     = "G01*\nX00000Y00000D02*\n"
Reset    = "X00000Y00000D02*\nM02*\n"
ResX     = 1000
ResY     = 1000
Wheel    = ""
Move     = "X%05dY%05dD02*\n"    ; (x, y)
Draw     = "X%05dY%05dD01*\n"    ; (x, y)
Flash    = "X%05dY%05dD03*\n"    ; (x, y)
Aperture = "%s*\n"               ; (Aperture code)
Info     = "Plotfile Info:\n"\
           "\n"\
           " Coordinate Format : 2.3\n"\
           " Coordinate Units  : Inch\n"\
           " Data Mode         : Absolute\n"\
           " Zero Suppression  : None\n"\
           " End Of Block      : *\n"\
           "\n"

[GERBERAUTO]

@GERBER
Long          = "Gerber photoplotter with automatic aperture generation"
Wheel         = "" ; avoids message!
AutoAperture  = "D%d" ; (Aperture number)
FirstAperture = 10

[EMMA]

Type     = PhotoPlotter
Long     = "EMMA 30/80 photoplotter"
Init     = "%%\nS7X000000Y000000\n"
Reset    = "S7X000000Y000000\n$\n"
ResX     = 20000
ResY     = 20000
Wheel    = ""
Move     = "S7X%06dY%06d\n"      ; (x, y)
Draw     = "S2X%06dY%06d\n"      ; (x, y)
Flash    = "S1X%06dY%06d\n"      ; (x, y)
Aperture = "%s\n"                ; (Aperture code)
Info     = "Plotfile Info:\n"\
           "\n"\
           " Coordinate Format : 6\n"\
           " Coordinate Units  : 1/800 mm\n"\
           " Data Mode         : Absolute\n"\
           " Zero Suppression  : None\n"\
           " End Of Block      : CR/LF\n"\
           "\n"

[GLASER]

Type     = PhotoPlotter
Long     = "GLASER DP-1504 photoplotter"
Init     = "IN;FC0.0254;CS1,1,0;SI1,1;\n"
Reset    = "PU;PA0,0;\n"
ResX     = 1000
ResY     = 1000
Wheel    = "GLASER.WHL";;
Move     = "PA%d,%d;\n"          ; (x, y)
Draw     = "PA%d,%d;\n"          ; (x, y)
PenDown  = "PD;\n"
PenUp    = "PU;\n"
Flash    = "PA%d,%d;%s\n"        ; (x, y, Aperture code)  ;;LitToBin???
Aperture = "%s\n"                ; (Aperture code)        ;;LitToBin???
Info     = "Plotfile Info:\n"\
           "\n"\
           " Coordinate Units  : 1/1000 Inch\n"\
           " Data Mode         : Absolute\n"\
           "\n"

[EXCELLON]

Type     = DrillStation
Long     = "Excellon drill station"
Init     = "%%\n"
Reset    = "M30\n"
ResX     = 1000
ResY     = 1000
Rack     = ""
Select   = "%s\n"                ; (Drill code)
Drill    = "X%1.0fY%1.0f\n"      ; (x, y)
Info     = "Drill File Info:\n"\
           "\n"\
           " Data Mode         : Absolute\n"\
           " Units             : 1/1000 Inch\n"\
           " End Of Block      : CR/LF\n"\
           "\n"

[SM1000]

Type     = DrillStation
Long     = "Sieb & Meyer 1000 drill station"
Init     = "%%%%1000\n"
Reset    = "M30\n"
ResX     = 2540
ResY     = 2540
Rack     = ""
Drill    = "X%1.0fY%1.0f%s\n"    ; (x, y, drill code)
Info     = "Drill File Info:\n"\
           "\n"\
           " Data Mode         : Absolute\n"\
           " End Of Block      : CR/LF\n"\
           " Units             : 1/100 mm\n"\
           "\n"

[SM3000]

Type     = DrillStation
Long     = "Sieb & Meyer 3000 drill station"
Init     = "%%%%3000\n"
Reset    = "M30\n"
ResX     = 25400
ResY     = 25400
Divide   = 1000                  ; makes coordinates MM
Rack     = ""
Drill    = "X%1.3fY%1.3f%s\n"    ; (x, y, drill code)
Info     = "Drill File Info:\n"\
           "\n"\
           " Data Mode         : Absolute\n"\
           " End Of Block      : CR/LF\n"\
           " Units             : mm\n"\
           "\n"

[SMS68]

Type     = DrillStation
Long     = "SMS68 drill station"
Init     = ";\n"
Reset    = "TO0;PA0,0;\n"
ResX     = 25400
ResY     = 25400
Rack     = ""
Select   = "%s;\n"               ; (Drill code)
Drill    = "PA%1.0f,%1.0f;PD;PU;\n"  ; (x, y)
Info     = "Drill File Info:\n"\
           "\n"\
           " Data Mode         : Absolute\n"\
           " End Of Block      : CR/LF\n"\
           " Units             : 1/1000 mm\n"\
           "\n"

[GBRDRL]

Type     = DrillStation
Long     = "Gerber Drill Code"
Init     = "G01*\nX00000Y00000D02*\n"
Reset    = "X00000Y00000D02*\nM02*\n"
ResX     = 1000
ResY     = 1000
Rack     = ""
Select   = "%s*\n"               ; (Drill code)
Drill    = "X%05.0fY%05.0fD03*\n"  ; (x, y)
Info     = "Drill File Info:\n"\
           "\n"\
           " Coordinate Format : 2.3\n"\
           " Coordinate Units  : Inch\n"\
           " Data Mode         : Absolute\n"\
           " Zero Suppression  : None\n"\
           " End Of Block      : *\n"\
           "\n"

[KYOCERA]

Type     = Kyocera
Long     = "Kyocera F-1000 laser printer"
Init     = "!R! Unit D;Spd1;\n"
Reset    = "Exit,E;\f"
Width    =  7.50
Height   = 10.00
ResX     = 300
ResY     = 300
FirmwareBug = YES

[CALCOMP]

Type     = Calcomp
Long     = "CalComp PCI pen plotter"
Init     = "\x08\x0B"  \ Init
           "\x09\x01"  ; Scaling 1
Reset    = ""
ResX     = 2032
ResY     = 2032
PenSelect  = "\x04%c"  ; Pens numbered 1..n
Sync     = "\x02"
Bias     = 0x20
Radix    = 0x40
Buffer   = 256
Checksum = YES

[CALCOMPE]

Type     = CalcompE
Long     = "CalComp PCI electrostatic plotter"
Init     = "\x08\x0B"  \ Init
           "\x09\x01"  ; Scaling 1
Reset    = ""
ResX     = 2032
ResY     = 2032
Sync     = "\x02"
Bias     = 0x20
Radix    = 0x40
Buffer   = 256
Checksum = YES
