*GPDSpecVersion: "1.0"
*Include: "StdNames.gpd"
*GPDFileVersion: "1.1"
*GPDFileName: "JMDMP9B.GPD"
*ModelName: "JM 9-pin Printer"
*MasterUnits: PAIR(160, 144)
*ResourceDLL: "JMDMP9B.Dll"
*PrinterType: SERIAL
*Feature: Orientation
{
    *rcNameID: =ORIENTATION_DISPLAY
    *DefaultOption: PORTRAIT
    *Option: PORTRAIT
    {
        *rcNameID: =PORTRAIT_DISPLAY
    }
    *Option: LANDSCAPE_CC270
    {
        *rcNameID: =LANDSCAPE_DISPLAY
    }
}
*Feature: InputBin
{
    *rcNameID: =PAPER_SOURCE_DISPLAY
    *DefaultOption: Option1
    *Option: Option1
    {
    		*rcNameID: 267
        *OptionID: 267
        *Command: CmdSelect
        {
            *Order: DOC_FINISH.3
            *Cmd: "<0A1D>V<01>"
        }
    }
    *Option: Option2
    {
        *rcNameID: 266
        *OptionID: 266
        *Command: CmdSelect
        {
            *Order: DOC_FINISH.3
            *Cmd: "<1B>J<FA>"
        }
    }
    *Option: Option3
    {
        *rcNameID: 268
        *OptionID: 268
        *Command: CmdSelect
        {
            *Order: DOC_FINISH.3
            *Cmd: "<0A1D>V<01>"
        }
    }
    *Option: Option4
    {
        *rcNameID: 269
        *OptionID: 269
        *Command: CmdSelect
        {
            *Order: DOC_FINISH.3
            *Cmd: "<0A1D>V<00>"
        }
    }
    *Option: Option5
    {
        *rcNameID: 270
        *OptionID: 270
        *Command: CmdSelect
        {
            *Order: DOC_FINISH.3
            *Cmd: "<0A1D>V<00>"
        }
    }
    *Option: Option6
    {
        *rcNameID: 273
        *OptionID: 273
    }
    *Option: Option7
    {
        *rcNameID: 274
        *OptionID: 274
    }
     *Option: Option8
    {
        *rcNameID: 277
        *OptionID: 277
        *Command: CmdSelect
        {
            *Order: PAGE_FINISH.3
            *Cmd: "<0A1D>V<01>"
        }
    }
        *Option: Option9
    {
        *rcNameID: 278
        *OptionID: 278
        *Command: CmdSelect
        {
            *Order: PAGE_FINISH.3
            *Cmd: "<0A1D>V<01>"
        }
    }
    *Option: Option10
    {
        *rcNameID: 279
        *OptionID: 279
        *Command: CmdSelect
        {
            *Order: PAGE_FINISH.3
            *Cmd: "<0A1D>V<00>"
        }
    }
    *Option: Option11
    {
        *rcNameID: 280
        *OptionID: 280
        *Command: CmdSelect
        {
            *Order: PAGE_FINISH.3
            *Cmd: "<0A1D>V<00>"
        }
    }

}
*Feature: Resolution
{
    *rcNameID: =RESOLUTION_DISPLAY
    *DefaultOption: Option2
    *Option: Option1
    {
        *Name: "80 x 72 " =DOTS_PER_INCH
        *DPI: PAIR(80, 72)
        *TextDPI: PAIR(80, 72)
        *PinsPerLogPass: 8
        *PinsPerPhysPass: 8
        EXTERN_GLOBAL: *StripBlanks: LIST(TRAILING)
        *SpotDiameter: 100
        *Command: CmdSendBlockData { *Cmd : "<1B>*<00>" %l{NumOfDataBytes } }
    }
    *Option: Option2
    {
        *Name: "160 x 72 " =DOTS_PER_INCH
        *DPI: PAIR(160, 72)
        *TextDPI: PAIR(160, 72)
        *PinsPerLogPass: 8
        *PinsPerPhysPass: 8
        EXTERN_GLOBAL: *StripBlanks: LIST(TRAILING)
        *SpotDiameter: 140
        *Command: CmdSendBlockData { *Cmd : "<1B>*<01>" %l{NumOfDataBytes} }
    }
    *Option: Option3
    {
        *Name: "160 x 144 " =DOTS_PER_INCH
        *DPI: PAIR(160, 144)
        *TextDPI: PAIR(160, 144)
        *PinsPerLogPass: 16
        *PinsPerPhysPass: 8
        EXTERN_GLOBAL: *StripBlanks: LIST(TRAILING)
*% Warning: this resolution has RES_BO_NO_ADJACENT set in GPC, which is ignored by GPD. Custom code is needed.
        *SpotDiameter: 140
        *Command: CmdSendBlockData { *Cmd : "<1B>*<01>" %l{NumOfDataBytes } }
    }
}
*Feature: PaperSize
{
    *rcNameID: =PAPER_SIZE_DISPLAY
    *DefaultOption: Option1
    *Option: Option1
    {
        *rcNameID: 258
        *OptionID: 258
        *PageDimensions: PAIR(397, 1684)
        *PrintableArea: PAIR(397, 1684)
        *PrintableOrigin: PAIR(0, 0)
        *switch: Resolution
        {
            *case: Option1
            {
*% Warning: the following printable width is adjusted (397->396) so it is divisible by the resolution X scale.
                *PrintableArea: PAIR(396, 1684)
            }
        }
        *Command: CmdSelect
        {
            *Order: DOC_SETUP.4
            *Cmd: "<1B>2"
        }
    }
    *Option: Option2
    {
        *rcNameID: 259
        *OptionID: 259
        *PageDimensions: PAIR(397, 576)
        *PrintableArea: PAIR(397, 576)
        *PrintableOrigin: PAIR(0, 0)
        *switch: Resolution
        {
            *case: Option1
            {
*% Warning: the following printable width is adjusted (397->396) so it is divisible by the resolution X scale.
                *PrintableArea: PAIR(396, 576)
            }
        }
        *Command: CmdSelect
        {
            *Order: DOC_SETUP.4
            *Cmd: "<1B>2"
        }
    }
    *Option: Option3
    {
        *rcNameID: 260
        *OptionID: 260
        *PageDimensions: PAIR(397, 792)
        *PrintableArea: PAIR(397, 792)
        *PrintableOrigin: PAIR(0, 0)
        *switch: Resolution
        {
            *case: Option1
            {
*% Warning: the following printable width is adjusted (397->396) so it is divisible by the resolution X scale.
                *PrintableArea: PAIR(396, 792)
            }
        }
        *Command: CmdSelect
        {
            *Order: DOC_SETUP.4
            *Cmd: "<1B>2"
        }
    }
    *Option: Option4
    {
        *rcNameID: 261
        *OptionID: 261
        *PageDimensions: PAIR(283, 1684)
        *PrintableArea: PAIR(283, 1684)
        *PrintableOrigin: PAIR(0, 0)
        *switch: Resolution
        {
            *case: Option1
            {
*% Warning: the following printable width is adjusted (283->282) so it is divisible by the resolution X scale.
                *PrintableArea: PAIR(282, 1684)
            }
        }
        *Command: CmdSelect
        {
            *Order: DOC_SETUP.4
            *Cmd: "<1B>2"
        }
    }
    *Option: CUSTOMSIZE
    {
        *rcNameID: =USER_DEFINED_SIZE_DISPLAY
        *MinSize: PAIR(160, 144)
        *MaxSize: PAIR(480, 32767)
        *MaxPrintableWidth: 480
        *MinLeftMargin: 0
        *CenterPrintable?: FALSE
        *Command: CmdSelect
        {
            *Order: DOC_SETUP.4
            *Cmd: "<1B>2"
        }
    }
}
*Feature: MediaType
{
    *rcNameID: =MEDIA_TYPE_DISPLAY
    *DefaultOption: Option1
    *Option: Option1
    {
        *rcNameID: 262
        *OptionID: 262
    }
    *Option: Option2
    {
        *rcNameID: 263
        *OptionID: 263
        *Command: CmdSelect
        {
            *Order: DOC_SETUP.6
            *Cmd: "<1B>p<00FFFF1B>p<01FFFF>"
        }
    }
    *Option: Option3
    {
        *rcNameID: 264
        *OptionID: 264
        *Command: CmdSelect
        {
            *Order: DOC_FINISH.6
            *Cmd: "<1B>p<00FFFF1B>p<01FFFF>"
        }
    }
}

*Feature: JobIntegrityProtocol
{
    *rcNameID: 281
    *DefaultOption: Option1
    *Option: Option1
    {
        *rcNameID: 282
    }
    *Option: Option2
    {
        *rcNameID: 283
        *Command: CmdSelect
        {
            *Order: DOC_SETUP.1
            *Cmd: "<1A0101011A0102021A010301>"
        }
    }
}

*Feature: OutputBin
{
    *rcNameID: =OUTPUTBIN_DISPLAY
    *DefaultOption: Option2
    *Option: Option1
    {
        *rcNameID: 275
        *Command: CmdSelect
        {
            *Order: PAGE_SETUP.8
            *Cmd: "<1D0C>"
        }
    }
    *Option: Option2
    {
        *rcNameID: 276
    }
}
*Feature: ColorMode
{
    *rcNameID: =COLOR_PRINTING_MODE_DISPLAY
    *DefaultOption: Mono
    *Option: Mono
    {
        *rcNameID: =MONO_DISPLAY
        *DevNumOfPlanes: 1
        *DevBPP: 1
        *Color? : FALSE
    }
    *Option: Color
    {
        *rcNameID: =COLOR_DISPLAY
        *DevNumOfPlanes: 4
        *DevBPP: 1
        *DrvBPP: 4
        EXTERN_GLOBAL: *UseExpColorSelectCmd? : TRUE
        *ColorPlaneOrder: LIST(BLACK, CYAN, MAGENTA, YELLOW)
        *Command: CmdSendBlackData { *Cmd : "<1B>r<00>" }
        *Command: CmdSendCyanData { *Cmd : "<1B>r<00>" }
        *Command: CmdSendMagentaData { *Cmd : "<1B>r<01>" }
        *Command: CmdSendYellowData { *Cmd : "<1B>r<01>" }
        *Command: CmdSelectBlackColor { *Cmd : "<1B>r<00>" }
        *Command: CmdSelectRedColor { *Cmd : "<1B>r<05>" }
        *Command: CmdSelectGreenColor { *Cmd : "<1B>r<06>" }
        *Command: CmdSelectYellowColor { *Cmd : "<1B>r<01>" }
        *Command: CmdSelectBlueColor { *Cmd : "<1B>r<03>" }
        *Command: CmdSelectMagentaColor { *Cmd : "<1B>r<01>" }
        *Command: CmdSelectCyanColor { *Cmd : "<1B>r<02>" }
    }
}
*Feature: Halftone
{
    *rcNameID: =HALFTONING_DISPLAY
    *DefaultOption: HT_PATSIZE_AUTO
    *Option: HT_PATSIZE_AUTO
    {
        *rcNameID: =HT_AUTO_SELECT_DISPLAY
    }
    *Option: HT_PATSIZE_SUPERCELL_M
    {
        *rcNameID: =HT_SUPERCELL_DISPLAY
    }
    *Option: HT_PATSIZE_6x6_M
    {
        *rcNameID: =HT_DITHER6X6_DISPLAY
    }
    *Option: HT_PATSIZE_8x8_M
    {
        *rcNameID: =HT_DITHER8X8_DISPLAY
    }
}
*Command: CmdStartDoc
{
    *Order: DOC_SETUP.1
    *Cmd: "<1B>@<1B>=<011B>R<001B>t<011B>r<001B>2"
}
*Command: CmdStartPage
{
    *Order: PAGE_SETUP.1
    *Cmd: "<0D>"
}
*Command: CmdEndJob
{
    *Order: JOB_FINISH.1
    *Cmd: "<1B>@"
}
*RotateCoordinate?: FALSE
*RotateRaster?: FALSE
*RotateFont?: FALSE
*switch: Orientation
{
    *case: PORTRAIT
    {
        *TextCaps: LIST(TC_OP_CHARACTER,TC_EA_DOUBLE,TC_IA_ABLE,TC_UA_ABLE,TC_RA_ABLE)
    }
    *case: LANDSCAPE_CC270
    {
        *TextCaps: LIST(TC_RA_ABLE)
    }
}
*CursorXAfterCR: AT_CURSOR_X_ORIGIN
*YMoveAttributes: LIST(SEND_CR_FIRST)
*MaxLineSpacing: 255
*XMoveThreshold: 0
*YMoveThreshold: *
*XMoveUnit: 160
*YMoveUnit: 144
*Command: CmdXMoveAbsolute { *Cmd : "<1B>$" %l{DestX } }
*Command: CmdYMoveRelDown { *Cmd : "<1B>J" %c[0,255]{max_repeat(DestYRel )} }
*Command: CmdSetLineSpacing { *Cmd : "<1B>3" %c[0,255]{LinefeedSpacing } }
*Command: CmdCR { *Cmd : "<0D>" }
*Command: CmdLF { *Cmd : "<0A>" }
*Command: CmdFF { *Cmd : "<1B>J<10>" }
*Command: CmdBackSpace { *Cmd : "<08>" }
*Command: CmdUniDirectionOn { *Cmd : "<1B>U<01>" }
*Command: CmdUniDirectionOff { *Cmd : "<1B>U<00>" }
*EjectPageWithFF?: TRUE
*switch: InputBin
{
    *case: Option3
    {
        *EjectPageWithFF?: FALSE
    }
    *case: Option5
    {
        *EjectPageWithFF?: FALSE
    }
    *case: Option7
    {
        *EjectPageWithFF?: FALSE
    }
        *case: Option9
    {
        *EjectPageWithFF?: FALSE
    }
        *case: Option11
    {
        *EjectPageWithFF?: FALSE
    }
}
*OutputDataFormat: V_BYTE
*OptimizeLeftBound?: FALSE
*CursorXAfterSendBlockData: AT_GRXDATA_END
*CursorYAfterSendBlockData: NO_MOVE
*DefaultCTT: -1
*Command: CmdBoldOn { *Cmd : "<1B>E" }
*Command: CmdBoldOff { *Cmd : "<1B>F" }
*Command: CmdItalicOn { *Cmd : "<1B>4" }
*Command: CmdItalicOff { *Cmd : "<1B>5" }
*Command: CmdUnderlineOn { *Cmd : "<1B>-<01>" }
*Command: CmdUnderlineOff { *Cmd : "<1B>-<00>" }
