*GPDSpecVersion: "1.1"
*Include: "StdNames.gpd"
*GPDFileVersion: "1.1"
*GPDFileName: "DP-515.GPD"
*ModelName: "DP-515"
*MasterUnits: PAIR(360, 360)
*ResourceDLL: "DP-515.Dll"
*PrinterType: SERIAL
*PrintRateUnit: CPS
*PrintRate: 220

*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
    }
    *Option: Option2
    {
        *rcNameID: 264
        *OptionID: 264
    }
}
*Feature: Resolution
{
    *rcNameID: =RESOLUTION_DISPLAY
    *DefaultOption: Option1
    *Option: Option1
    {
        *Name: "120 x 120 " =DOTS_PER_INCH
        *DPI: PAIR(120, 120)
        *TextDPI: PAIR(120, 120)
        *PinsPerLogPass: 16
        *PinsPerPhysPass: 16
        EXTERN_GLOBAL: *StripBlanks: LIST(LEADING,ENCLOSED,TRAILING)
        *SpotDiameter: 100
        *Command: CmdSendBlockData { *Cmd : "<1B>L" %l{NumOfDataBytes/2} }
    }
}
*Feature: PaperSize
{
    *rcNameID: =PAPER_SIZE_DISPLAY
    *DefaultOption: A4
    *Option: A4
    {
        *rcNameID: =RCID_DMPAPER_SYSTEM_NAME
        *Command: CmdSelect
        {
            *Order: DOC_SETUP.4
            *Cmd: "<1B>2<1B>CF"
        }
        *switch: InputBin
        {
            *case: Option1
            {
                *PrintableArea: PAIR(2880, 4074)
                *PrintableOrigin: PAIR(48, 60)
            }
            *case: Option2
            {
                *PrintableArea: PAIR(2880, 4074)
                *PrintableOrigin: PAIR(48, 60)            
            }
        }
    }
    *Option: A4_ROTATED
    {
        *rcNameID: =RCID_DMPAPER_SYSTEM_NAME
        *Command: CmdSelect
        {
            *Order: DOC_SETUP.4
            *Cmd: "<1B>2<1B>C2"
        }
        *switch: InputBin
        {
            *case: Option1
            {
                *PrintableArea: PAIR(3960, 2832)
                *PrintableOrigin: PAIR(48, 60)
            }
            *case: Option2
            {
                *PrintableArea: PAIR(3960,2832)
                *PrintableOrigin: PAIR(48, 60)            
            }
        }
    }
    *Option: B5
    {
        *rcNameID: =RCID_DMPAPER_SYSTEM_NAME
        *Command: CmdSelect
        {
            *Order: DOC_SETUP.4
            *Cmd: "<1B>2<1B>C="
        }
        *switch: InputBin
        {
            *case: Option1
            {
                *PrintableArea: PAIR(2484, 3504)
                *PrintableOrigin: PAIR(48, 60)
            }
            *case: Option2
            {
                *PrintableArea: PAIR(2484, 3504)
                *PrintableOrigin: PAIR(48, 60)
            }
        }
    }
    *Option: B5_JIS_ROTATED
    {
        *rcNameID: =RCID_DMPAPER_SYSTEM_NAME
        *Command: CmdSelect
        {
            *Order: DOC_SETUP.4
            *Cmd: "<1B>2<1B>C+"
        }
        *switch: InputBin
        {
            *case: Option1
            {
*% Warning: this paper size exceeds the MaxWidth, imageable width is truncated .
                *PrintableArea: PAIR(3546, 2448)
                *PrintableOrigin: PAIR(48, 60)
            }
            *case: Option2
            {
*% Warning: this paper size exceeds the MaxWidth, imageable width is truncated .
                *PrintableArea: PAIR(3546, 2448)
                *PrintableOrigin: PAIR(48, 60)
            }
        }
    }
    *Option: ENV_10
    {
        *rcNameID: =RCID_DMPAPER_SYSTEM_NAME
        *RotateSize? : TRUE
        *Command: CmdSelect
        {
            *Order: DOC_SETUP.4
            *Cmd: "<1B>2<1B>C<19>"
        }
        *switch: InputBin
        {
            *case: Option1
            {
*% Warning: this paper size exceeds the MaxWidth, imageable width is truncated .
                *PrintableArea: PAIR(3324, 1344)
                *PrintableOrigin: PAIR(48, 60)
            }
            *case: Option2
            {
*% Warning: this paper size exceeds the MaxWidth, imageable width is truncated .
                *PrintableArea: PAIR(3324, 1344)
                *PrintableOrigin: PAIR(48, 60)
            }
        }
    }
    *Option: LETTER
    {
        *rcNameID: =RCID_DMPAPER_SYSTEM_NAME
        *Command: CmdSelect
        {
            *Order: DOC_SETUP.4
            *Cmd: "<1B>2<1B>CB"
        }
        *switch: InputBin
        {
            *case: Option1
            {
                *PrintableArea: PAIR(2964, 3792)
                *PrintableOrigin: PAIR(48, 60)
            }
            *case: Option2
            {
                *PrintableArea: PAIR(2964, 3792)
                *PrintableOrigin: PAIR(48, 60)
            }
        }
    }
    *Option: EXECUTIVE
    {
        *rcNameID: =RCID_DMPAPER_SYSTEM_NAME
        *Command: CmdSelect
        {
            *Order: DOC_SETUP.4
            *Cmd: "<1B>2<1B>C?"
        }
        *switch: InputBin
        {
            *case: Option1
            {
                *PrintableArea: PAIR(2514, 3648)
                *PrintableOrigin: PAIR(48, 60)
            }
            *case: Option2
            {
                *PrintableArea: PAIR(2514, 3648)
                *PrintableOrigin: PAIR(48, 60)
            }
        }
    }
    *Option: Option3
    {
        *rcNameID: 263
        *OptionID: 263
        *PageDimensions: PAIR(4320, 3960)
        *Command: CmdSelect
        {
            *Order: DOC_SETUP.4
            *Cmd: "<1B>0<1B>CB"
        }
        *switch: InputBin
        {
            *case: Option1
            {
*% Warning: this paper size exceeds the MaxWidth, imageable width is truncated .
                *PrintableArea: PAIR(3960, 3840)
                *PrintableOrigin: PAIR(180,60)
            }
            *case: Option2
            {
*% Warning: this paper size exceeds the MaxWidth, imageable width is truncated .
                *PrintableArea: PAIR(3960, 3960)
                *PrintableOrigin: PAIR(180,0)
            }
        }
    }
    *Option: Option4
    {
        *rcNameID: 264
        *OptionID: 264
        *PageDimensions: PAIR(4320, 4320)
        *Command: CmdSelect
        {
            *Order: DOC_SETUP.4
            *Cmd: "<1B>2<1B>CH"
        }
        *switch: InputBin
        {
            *case: Option1
            {
*% Warning: this paper size exceeds the MaxWidth, imageable width is truncated .
                *PrintableArea: PAIR(3960, 4200)
                *PrintableOrigin: PAIR(180, 60)
            }
            *case: Option2
            {
*% Warning: this paper size exceeds the MaxWidth, imageable width is truncated .
                *PrintableArea: PAIR(3960, 4320)
                *PrintableOrigin: PAIR(180, 0)
            }
        }
    }
    *Option: Option5
    {
        *rcNameID: 265
        *OptionID: 265
        *PageDimensions: PAIR(3240, 1980)
        *Command: CmdSelect
        {
            *Order: DOC_SETUP.4
            *Cmd: "<1B>2<1B>C!"
        }
        *switch: InputBin
        {
            *case: Option1
            {
*% Warning: this paper size exceeds the MaxWidth, imageable width is truncated .
                *PrintableArea: PAIR(2880, 1860)
                *PrintableOrigin: PAIR(180, 60)
            }
            *case: Option2
            {
*% Warning: this paper size exceeds the MaxWidth, imageable width is truncated .
                *PrintableArea: PAIR(2880, 1980)
                *PrintableOrigin: PAIR(180, 0)
            }
        }
    }
    *Option: Option6
    {
        *rcNameID: 266
        *OptionID: 266
        *PageDimensions: PAIR(3420, 1980)
        *Command: CmdSelect
        {
            *Order: DOC_SETUP.4
            *Cmd: "<1B>2<1B>C!"
        }
        *switch: InputBin
        {
            *case: Option1
            {
*% Warning: this paper size exceeds the MaxWidth, imageable width is truncated .
                *PrintableArea: PAIR(2880, 1860)
                *PrintableOrigin: PAIR(180, 60)
            }
            *case: Option2
            {
*% Warning: this paper size exceeds the MaxWidth, imageable width is truncated .
                *PrintableArea: PAIR(2880, 1860)
                *PrintableOrigin: PAIR(18, 0)
            }
        }
    }
    *Option: Option7
    {
        *rcNameID: 267
        *OptionID: 267
        *PageDimensions: PAIR(3420, 3960)
        *Command: CmdSelect
        {
            *Order: DOC_SETUP.4
            *Cmd: "<1B>2<1B>CB"
        }
        *switch: InputBin
        {
            *case: Option1
            {
*% Warning: this paper size exceeds the MaxWidth, imageable width is truncated .
                *PrintableArea: PAIR(2880, 3840)
                *PrintableOrigin: PAIR(180, 60)
            }
            *case: Option2
            {
*% Warning: this paper size exceeds the MaxWidth, imageable width is truncated .
                *PrintableArea: PAIR(2880, 3960)
                *PrintableOrigin: PAIR(180, 0)
            }
        }
    }
    *Option: Option8
    {
        *rcNameID: 268
        *OptionID: 268
        *PageDimensions: PAIR(3240, 4320)
        *Command: CmdSelect
        {
            *Order: DOC_SETUP.4
            *Cmd: "<1B>2<1B>CH"
        }
        *switch: InputBin
        {
            *case: Option1
            {
*% Warning: this paper size exceeds the MaxWidth, imageable width is truncated .
                *PrintableArea: PAIR(2880, 4200)
                *PrintableOrigin: PAIR(180, 60)
            }
            *case: Option2
            {
*% Warning: this paper size exceeds the MaxWidth, imageable width is truncated .
                *PrintableArea: PAIR(2880, 4320)
                *PrintableOrigin: PAIR(180, 0)
            }
        }
    }
     *Option: Option9
    {
        *rcNameID: 261
        *OptionID: 261
        *PageDimensions: PAIR(3240, 1320)
        *Command: CmdSelect
        {
            *Order: DOC_SETUP.4
            *Cmd: "<1B>2<1B>C<16>"
        }
        *switch: InputBin
        {
            *case: Option1
            {
*% Warning: this paper size exceeds the MaxWidth, imageable width is truncated .
                *PrintableArea: PAIR(2880, 1280)
                *PrintableOrigin: PAIR(180, 60)
            }
            *case: Option2
            {
*% Warning: this paper size exceeds the MaxWidth, imageable width is truncated .
                *PrintableArea: PAIR(2880, 1320)
                *PrintableOrigin: PAIR(180, 0)
            }
        }
    }
     *Option: Option10
    {
        *rcNameID: 262
        *OptionID: 262
        *PageDimensions: PAIR(3240, 990)
        *Command: CmdSelect
        {
            *Order: DOC_SETUP.4
            *Cmd: "<1B>0<1B>C<16>"
        }
        *switch: InputBin
        {
            *case: Option1
            {
*% Warning: this paper size exceeds the MaxWidth, imageable width is truncated .
                *PrintableArea: PAIR(2880, 960)
                *PrintableOrigin: PAIR(180, 60)
            }
            *case: Option2
            {
*% Warning: this paper size exceeds the MaxWidth, imageable width is truncated .
                *PrintableArea: PAIR(2880, 990)
                *PrintableOrigin: PAIR(180, 0)
            }
        }
    }
     *Option: CUSTOMSIZE
    {
        *rcNameID: =USER_DEFINED_SIZE_DISPLAY
        *MinSize: PAIR(180, 216)
        *MaxSize: PAIR(4320, 32767)
        *MaxPrintableWidth: 3960
        *MinLeftMargin: 0
        *CenterPrintable?: FALSE
        *switch: InputBin
        {
            *case: Option1
            {
                *TopMargin: 60
                *BottomMargin: 60
            }
            *case: Option2
            {
                *TopMargin: 0
                *BottomMargin: 0
            }
        }
        *Command: CmdSelect
        {
            *Order: DOC_SETUP.4
            *Cmd: "<1B>2<1B>C" %c{(PhysPaperLength / 60) }
        }
    }
}
*InvalidCombination: LIST(InputBin.Option2, PaperSize.B5)
*InvalidCombination: LIST(InputBin.Option2, PaperSize.B5_JIS_ROTATED)
*InvalidCombination: LIST(InputBin.Option2, PaperSize.A4)
*InvalidCombination: LIST(InputBin.Option2, PaperSize.A4_ROTATED)
*InvalidCombination: LIST(InputBin.Option2, PaperSize.EXECUTIVE)
*InvalidCombination: LIST(InputBin.Option2, PaperSize.LETTER)
*InvalidCombination: LIST(InputBin.Option2, PaperSize.ENV_10)
*Feature: PrintQuality
{
    *rcNameID: =TEXT_QUALITY_DISPLAY
    *DefaultOption: NEAR_LETTER_QUALITY
    *Option: NEAR_LETTER_QUALITY
    {
        *rcNameID: =NEAR_LETTER_QUALITY_DISPLAY
        *Command: CmdSelect
        {
            *Order: DOC_SETUP.2
            *Cmd: "<1B>x<01><1C>x0"
        }
    }
    *Option: DRAFT_QUALITY
    {
        *rcNameID: =DRAFT_QUALITY_DISPLAY
        *Command: CmdSelect
        {
            *Order: DOC_SETUP.2
            *Cmd: "<1B>x<00><1C>x2"
        }
    }
}
*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>t<011B>6"
}
*Command: CmdStartPage
{
    *Order: PAGE_SETUP.1
    *Cmd: "<0D>"
}
*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: 60
*YMoveUnit: 60
*Command: CmdXMoveAbsolute { *Cmd : "<1B>$" %l{(DestX  / 6) } }
*Command: CmdYMoveRelDown { *Cmd : "<1B><1D>J" %c[0,255]{max_repeat((DestYRel / 6) )} }
*Command: CmdSetLineSpacing { *Cmd : "<1B>3" %c[0,255]{(LinefeedSpacing / 2) } }
*Command: CmdCR { *Cmd : "<0D>" }
*Command: CmdLF { *Cmd : "<0A>" }
*Command: CmdFF { *Cmd : "<0C>" }
*Command: CmdBackSpace { *Cmd : "<08>" }
*Command: CmdUniDirectionOn { *Cmd : "<1B>U<01>" }
*Command: CmdUniDirectionOff { *Cmd : "<1B>U<00>" }
*EjectPageWithFF?: TRUE
*OutputDataFormat: V_BYTE
*OptimizeLeftBound?: FALSE
*CursorXAfterSendBlockData: AT_GRXDATA_END
*CursorYAfterSendBlockData: NO_MOVE
*DefaultFont: 1
*DefaultCTT: 0
*switch: Orientation
{
    *case: PORTRAIT
    {
        *DeviceFonts: LIST(1,2,3,4,5,6,7,8)
    }
    *case: LANDSCAPE_CC270
    {
        *DeviceFonts: LIST()
    }
}
*Command: CmdBoldOn { *Cmd : "<1B>E" }
*Command: CmdBoldOff { *Cmd : "<1B>F" }
*Command: CmdItalicOn { *Cmd : "<1B>4" }
*Command: CmdItalicOff { *Cmd : "<1B>5" }
*Command: CmdUnderlineOn { *Cmd : "<1B>-<011C>-<01>" }
*Command: CmdUnderlineOff { *Cmd : "<1B>-<001C>-<00>" }
