*GPDSpecVersion: "1.0"
*Include: "StdNames.gpd"
*GPDFileVersion: "2.5"
*GPDFileName: "MP220D.GPD"
*ModelName: "Jolimark MP-220D"
*MasterUnits: PAIR(160, 144)
*ResourceDLL: "MP220D.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: 265
        *OptionID: 265
        *Command: CmdSelect
        {
            *Order: DOC_FINISH.3
            *Cmd: "<1B>J<76>"
        }
    }
    *Option: Option2
    {
        *rcNameID: 271
        *OptionID: 271
    }
    *Option: Option3
    {
        *rcNameID: 272
        *OptionID: 272
    }
}
*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<00FFFF>"
        }
    }
    *Option: Option3
    {
        *rcNameID: 264
        *OptionID: 264
        *Command: CmdSelect
        {
            *Order: DOC_FINISH.6
            *Cmd:  "<1B>p<00FFFF>"
        }
    }
}
*Feature: OutputBin
{
    *rcNameID: =OUTPUTBIN_DISPLAY
    *DefaultOption: Option1
    *Option: Option1
    {
        *rcNameID: 275
        *Command: CmdSelect
        {
            *Order: PAGE_SETUP.8
            *Cmd: "<1D0C>"
        }
    }
    *Option: Option2
    {
        *rcNameID: 276
    }
}
*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
    }
}
*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>" }
